# CVE-2026-38427: Arendst Tasmota heap buffer overflow in fetch_jpg

Source: https://junglewise.ai/threats/cve-2026-38427-arendst-tasmota-heap-buffer-overflow-in-fetch-jpg  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-27. Updated: 2026-05-27  
License: CC BY 4.0 with a link back

CVE-2026-38427 · Severity: info · CVSS 9.8 · Published 2026-05-27

Tasmota, a popular open-source firmware for smart home devices like smart plugs and light switches, contains a security flaw in how it handles image downloads. An attacker can trick a device into connecting to a malicious server that sends a specially crafted image file, causing the device to crash or potentially allowing the attacker to take full control of the hardware. This could lead to unauthorized access to the device's functions or the local network it is connected to.

Technologies: [Tasmota](https://junglewise.ai/threats/technologies/tasmota). Vendors: [Tasmota](https://junglewise.ai/threats/vendors/tasmota).

## Quick answers

**Is CVE-2026-38427 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-38427 being exploited in the wild.

**How severe is CVE-2026-38427?** Informational severity, with a CVSS score of 9.8, published 27 May 2026.

**Which products and versions are affected?** Tasmota through 15.3.0.3.

**Is there a fix for CVE-2026-38427?** A patch was published on 2026-05-01: Patch released in Tasmota v15.3.0.4+ Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-38427 attacked?** It is attacked over the network, in an operating system.

**Am I affected by CVE-2026-38427?** Check whether you run Tasmota at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An integer wraparound vulnerability exists in the fetch_jpg() function within xdrv_10_scripter.ino of Tasmota firmware. When the device fetches MJPEG frames, the Content-Length header is processed using atoi() and stored in a uint16_t variable. If the header value exceeds 65535, the value wraps around, resulting in the allocation of an undersized heap buffer via special_malloc(). Subsequent read operations then overflow this buffer or leave residual data in the stream, leading to heap corruption. This can be triggered remotely if an attacker can induce the device to connect to a malicious HTTP server (e.g., via a script or MITM), potentially resulting in a Denial of Service (DoS) or Remote Code Execution (RCE) on ESP32-based hardware. The issue is addressed in version 15.3.0.4.

## Affected products

- Arendst Tasmota through 15.3.0.3

## Timeline

- 2026-03-29: disclosed: Vulnerability discovered and reported to MITRE
- 2026-05-27: advisory: CVE published by NVD/MITRE
- 2026-05-01: patched: Patch released in Tasmota v15.3.0.4+

## References

- [https://github.com/arendst/Tasmota/blob/c207cc2/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino](https://github.com/arendst/Tasmota/blob/c207cc2/tasmota/tasmota_xdrv_driver/xdrv_10_scripter.ino)
- [https://github.com/sermikr0/CVE-2026-38427](https://github.com/sermikr0/CVE-2026-38427)

## Related threats

- [arendst Tasmota buffer overflow in fetch_jpg](https://junglewise.ai/threats/cve-2026-38426-arendst-tasmota-buffer-overflow-in-fetch-jpg)
- [arendst Tasmota buffer overflow in fetch_jpg function](https://junglewise.ai/threats/cve-2026-38422-arendst-tasmota-buffer-overflow-in-fetch-jpg-function)
