CVE-2026-42854 arduino-esp32: Stack buffer overflow in WebServer multipart boundary parsing leads to remote crash potential RCE

Critical 9.8 Published Updated

Remote attackers can trigger a stack buffer overflow in the WebServer multipart parser, potentially causing crashes or executing arbitrary code on ESP32 devices.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-42854?

CVE-2026-42854 is a critical memory corruption vulnerability in espressif arduino-esp32, published on 12 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-121

Which versions are affected by CVE-2026-42854?

It affects 1 product.

Products include Espressif Arduino-Esp32.

How do I fix CVE-2026-42854?

No fix has been published for CVE-2026-42854 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2026-42854 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42854 exists.

Sources

Also known as GHSA-8cmm-3887-r32j.

Is CVE-2026-42854 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free