CVE-2026-42854: CWE-121: Stack-based Buffer Overflow in espressif arduino-esp32
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.
AI Analysis
Technical Summary
The arduino-esp32 core for ESP32 microcontrollers contains a stack-based buffer overflow (CWE-121) in its WebServer multipart form parser. Specifically, it allocates a variable length array on the stack sized according to the 'boundary' parameter in the Content-Type HTTP header, which is attacker-controlled. Without enforcing length limits, sending a boundary string longer than approximately 8000 characters overflows the 8192-byte task stack of the loopTask. This overflow can lead to a crash and potentially remote code execution. The vulnerability is identified as CVE-2026-42854 with a CVSS 3.1 score of 9.8 (critical). It affects arduino-esp32 versions before 3.3.8, where the issue is fixed.
Potential Impact
An attacker can send a specially crafted HTTP request with an excessively long multipart boundary string, causing a stack overflow in the WebServer task. This can crash the device or lead to remote code execution, compromising confidentiality, integrity, and availability of affected devices running vulnerable versions of arduino-esp32.
Mitigation Recommendations
A patch is available in arduino-esp32 version 3.3.8 that fixes this vulnerability. Users should upgrade to version 3.3.8 or later to remediate the issue. Since this is a cloud service environment, the vendor manages remediation for the cloud-hosted service; users should verify with the vendor that updates have been applied. No additional mitigation steps are indicated in the advisory.
CVE-2026-42854: CWE-121: Stack-based Buffer Overflow in espressif arduino-esp32
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 v3.1
Score 9.8critical
Affected software
pkg:github/espressif/arduino-esp32Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The arduino-esp32 core for ESP32 microcontrollers contains a stack-based buffer overflow (CWE-121) in its WebServer multipart form parser. Specifically, it allocates a variable length array on the stack sized according to the 'boundary' parameter in the Content-Type HTTP header, which is attacker-controlled. Without enforcing length limits, sending a boundary string longer than approximately 8000 characters overflows the 8192-byte task stack of the loopTask. This overflow can lead to a crash and potentially remote code execution. The vulnerability is identified as CVE-2026-42854 with a CVSS 3.1 score of 9.8 (critical). It affects arduino-esp32 versions before 3.3.8, where the issue is fixed.
Potential Impact
An attacker can send a specially crafted HTTP request with an excessively long multipart boundary string, causing a stack overflow in the WebServer task. This can crash the device or lead to remote code execution, compromising confidentiality, integrity, and availability of affected devices running vulnerable versions of arduino-esp32.
Mitigation Recommendations
A patch is available in arduino-esp32 version 3.3.8 that fixes this vulnerability. Users should upgrade to version 3.3.8 or later to remediate the issue. Since this is a cloud service environment, the vendor manages remediation for the cloud-hosted service; users should verify with the vendor that updates have been applied. No additional mitigation steps are indicated in the advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-30T16:44:48.378Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
- Is Cloud Service
- true
Threat ID: 6a03a7e4cbff5d86101ff973
Added to database: 05/12/2026, 22:21:24 UTC
Last enriched: 05/12/2026, 22:36:31 UTC
Last updated: 06/28/2026, 08:51:26 UTC
Views: 157
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.