# CVE-2026-137031: arduino-esp32: Path traversal in Webserver's \`serveStatic()\`

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **CWE:** CWE-22
- **Published:** 2026-11-30T17:43:47.777Z
- **Modified:** 2026-11-30T18:18:37.380Z

> **AI summary (AI-generated, claude-haiku-5-5):** An unauthenticated network attacker can use crafted HTTP requests to read files outside the static document root via path traversal in arduino-esp32's WebServer serveStatic() on LittleFS or SPIFFS.

## Who should check

- Anyone running espressif arduino-esp32 \< 3.3.12; \>= 4.0.0-alpha1, \< 4.0.0

## Description

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 and fixed versions

- espressif arduino-esp32: \< 3.3.12; \>= 4.0.0-alpha1, \< 4.0.0 (cvelist)

## Mitigation

- Upgrade arduino-esp32 to 4.0.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-137031. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-137031.md
Affected: espressif arduino-esp32 < 3.3.12; >= 4.0.0-alpha1, < 4.0.0
Fixed in: espressif arduino-esp32 3.3.12, espressif arduino-esp32 4.0.0

Steps:
1. Search this machine and project for espressif arduino-esp32: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-137031 being exploited?

There is no confirmed exploitation: CVE-2026-137031 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-137031?

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-137031?

espressif arduino-esp32 \< 3.3.12; \>= 4.0.0-alpha1, \< 4.0.0.

### Is there a fix for CVE-2026-137031?

Yes. Fixed in espressif arduino-esp32 3.3.12, espressif arduino-esp32 4.0.0. Upgrade arduino-esp32 to 4.0.0 or later.

### How do I check if I'm affected by CVE-2026-137031?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/espressif/arduino-esp32/security/advisories/GHSA-vqp8-ppw3-8mc7>
- patch: <https://github.com/espressif/arduino-esp32/pull/12794>
- patch: <https://github.com/espressif/arduino-esp32/commit/5cdf8975ae8d9e35888b724b01a444d22406424e>
- other: <https://github.com/espressif/arduino-esp32/releases/tag/3.3.12>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-137031>

HTML: <https://flawdb.com/CVE-2026-137031> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-137031>
