esp-idf: Heap-based Buffer Overflow
CVE-2026-45542 is a high-severity heap-based buffer overflow vulnerability in esp-idf from Espressif, with a CVSS 3.1 base score of 7.1 out of 10. It can be exploited from the same local network by an unauthenticated attacker, without any action from a user. Affected esp-idf versions: = 5.2.6; = 5.3.5; = 5.4.4, 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.33% 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.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Espressif | esp-idf | = 5.2.6; = 5.3.5; = 5.4.4; = 5.5.4; = 6.0 | 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
- AdjacentThe attacker must be on the same local network segment.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- 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
- LowLimited modification of data is possible.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H. Scored by CNA (github.com).
Official description
ESF-IDF is the Espressif Internet of Things (IOT) Development Framework. In versions 5.2.6, 5.3.5, 5.4.4, 5.5.4, and 6.0, a heap buffer overflow exists in the Security Scheme 2 (SRP6a) session-setup path of the protocomm component. The first-phase handler (handle_session_command0() in components/protocomm/src/security/security2.c) trusts the length of a client-supplied protobuf field for the SRP6a username and copies it into a buffer whose size is derived from a narrower destination type. The resulting truncation-versus-copy asymmetry corrupts the heap when an oversized value is supplied. This issue has been patched in versions 5.2.7, 5.3.6, 5.4.5, 5.5.5, and 6.0.1.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Heap-based Buffer Overflow
The product writes past the end of a buffer that was allocated on the heap.
How developers prevent this class of flaw
- Pre-design: Use a language or compiler that performs automatic bounds checking.
- Use an abstraction library to abstract away risky APIs. Not a complete solution.
- 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.
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
Advisories
Patches and release notes
- github.com/espressif/esp-idf/commit/0ea58d79845ad674d0358d5de246015a68c4cb4f
- github.com/espressif/esp-idf/commit/56c3e385611e63162d0f2f8504ac4ae2ccfccef0
- github.com/espressif/esp-idf/commit/71eb2dbe6aaef830719ecac8edf409e2992b64b2
- github.com/espressif/esp-idf/commit/9b4cacf9cbc69379972de6a2247fcf5af9240961
- github.com/espressif/esp-idf/commit/a2f4554f10ba075c98cbc67464db096ba32497cf
- github.com/espressif/esp-idf/commit/f5d24a7e919bc5f447091479656b86da6762a103
Other vulnerabilities in esp-idf
- 7.4 High severity
- 7.1 High severity
- 9.3 Critical severity
- 7.5 High severity
- 7.5 High severity
- 8.8 High severity
Recent Heap-based Buffer Overflow vulnerabilities
- 7.5 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.