esp-idf: Stack-based Buffer Overflow
CVE-2026-113783 is a high-severity stack-based buffer overflow vulnerability in esp-idf from Espressif, with a CVSS 3.1 base score of 7.4 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected esp-idf versions: >= 5.2.3, <= 5.2.8; >= 5.3.2, < 5.3.7; >= 5.4.0, < 5.4.5, and others listed below. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.35% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of esp-idf you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Espressif | esp-idf | >= 5.2.3, <= 5.2.8; >= 5.3.2, < 5.3.7; >= 5.4.0, < 5.4.5; >= 5.5.0, < 5.5.6; >= 6.0.0, < 6.0.3 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H. Scored by CNA (github.com).
Official description
ESP-IDF is the Espressif Internet of Things (IOT) Development Framework. From 5.2.3 until 5.3.7, 5.4.5, 5.5.6, and 6.0.3, the lwIP DNS resolver's cached-lookup path in dns_lookup() in dns.c copies every cached address into a caller-provided single ip_addr_t output buffer without a length parameter or bounds check. When CONFIG_LWIP_DNS_MAX_HOST_IP is greater than 1 and a cached hostname has multiple A or AAAA records, a subsequent lookup through dns_gethostbyname() or dns_gethostbyname_addrtype() writes beyond the single-element buffer into adjacent stack memory. A network-positioned attacker who influences DNS responses can cause a reboot through stack-canary corruption or, without stack protection, overwrite stack variables with attacker-controlled address bytes and potentially redirect control flow. This issue is fixed in versions 5.5.6 and 6.0.3 and is scheduled to be fixed in versions 5.3.7 and 5.4.5. No fixed release is available for the end-of-life 5.2 line.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Stack-based Buffer Overflow
The product writes past the end of a buffer that was allocated on the stack.
How developers prevent this class of flaw
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND discusses canary-based detection in detail.
- Use an abstraction library to abstract away risky APIs. Not a complete solution.
- Implement and perform bounds checking on input.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/espressif/esp-idf/commit/75f2ff7e0c2d19e113293ec122b701c83d2f6665
- github.com/espressif/esp-idf/commit/7ab85eb4dc7d7695960d940badcd62592c365056
- github.com/espressif/esp-idf/commit/882843dbf838b0c02e09d46bb6283bda73496b8c
- github.com/espressif/esp-idf/commit/98e6e7a08fca391563651a1e751cc45a3b27d18b
- github.com/espressif/esp-idf/commit/af7543d00a4d7b489e010a70b59fd3d8022a40f4
- github.com/espressif/esp-idf/commit/defaa2f559470acfee5e2e5ea80a79b73424d483
Other vulnerabilities in esp-idf
- 7.1 High severity
- 9.3 Critical severity
- 7.5 High severity
- 7.1 High severity
- 7.5 High severity
- 8.8 High severity
Recent Stack-based Buffer Overflow vulnerabilities
- 7.3 High severity
- 8.7 High severity
- 9.6 Critical severity
- 7.5 High severity
- 8.8 High severity
- 8.4 High severity
Spotted an error? Tell us.