CVE-2026-137031: arduino-esp32: Path traversal in Webserver's `serveStatic()`
arduino-esp32 is an Arduino core for the ESP32, ESP32-S2, ESP32-S3, ESP32-C3, ESP32-C6 and ESP32-H2 microcontrollers. Prior to 3.3.12 and in 4.0.0-alpha1, the WebServer library's serveStatic() implementation does not reject literal or percent-encoded . and .. path segments. An unauthenticated network attacker can submit a crafted HTTP request that resolves outside the configured static document root and reads files elsewhere on the LittleFS or SPIFFS filesystem. Applications that do not call serveStatic(), or that mount only a dedicated public filesystem without sensitive files, are not materially affected. This issue is fixed in versions 3.3.12 and 4.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
arduino-esp32to a version that resolves this vulnerability.Fixed in 3.3.12 - Upgrade
Upgrade
arduino-esp32to a version that resolves this vulnerability.Fixed in 4.0.0
Event History
Frequently Asked Questions
Which deployments are materially exposed?
Deployments are materially exposed when their application uses the WebServer library's serveStatic() and the mounted LittleFS or SPIFFS filesystem contains files outside the intended public document root that should not be readable. Applications that do not call serveStatic(), or that mount only a dedicated public filesystem with no sensitive files, are not materially affected.
What does an attacker need to exploit this issue?
An attacker needs network access to the affected HTTP service and can exploit it without authentication or user interaction. Crafted requests using literal or percent-encoded . and .. path segments can resolve outside the configured static document root.
What can an attacker obtain through successful exploitation?
A successful attack allows reading files elsewhere on the LittleFS or SPIFFS filesystem. The provided information describes a confidentiality impact, not modification or availability impact.
What should be done if an immediate upgrade is not possible?
Avoid using serveStatic() where possible, and ensure the filesystem mounted for static serving is a dedicated public filesystem that contains no sensitive files outside the intended document root. Restrict network exposure to the HTTP service where feasible.
How can I determine whether a device needs remediation?
Check whether the application calls serveStatic() and whether it runs a version prior to 3.3.12 or 4.0.0-alpha1. Version 3.3.12 and 4.0.0 contain the fix.