Cyber Resilience

CVE-2025-52471

Memory Safety in Espressif Esp-Idf 5.1.6 … 5.4.1

Published
24 June 2025
Modified
17 June 2026
Patch / advisory
CVSS Score v4 7.2
Click a component to see what it means
Raw vectorCVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0074 51th percentile
Risk Priority 45 floored blend · peak EPSS

Summary

CVE-2025-52471 is a high-severity Wrap or Wraparound (CWE-191) vulnerability in Espressif Esp-Idf. Its CVSS base score is 7.2 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 49% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-8 (Security and Privacy Engineering Principles) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

An integer underflow vulnerability (CWE-191) exists in the ESP-NOW protocol implementation inside the ESP Wi-Fi component of the Espressif IoT Development Framework (ESP-IDF). The flaw affects versions 5.4.1, 5.3.3, 5.2.5, and 5.1.6 and originates from missing validation of user-supplied data length values inside the packet receive function, which can produce out-of-bounds memory access and arbitrary memory writes. On devices lacking memory protection, the condition may be leveraged for remote code execution.

An unauthenticated network attacker can trigger the issue by sending a crafted ESP-NOW frame that supplies a negative or malformed length field, resulting in high-impact confidentiality, integrity, and availability consequences on the target device. The CVSS 4.0 score of 7.2 reflects network attack vector, low complexity, and no required user interaction or privileges.

Patches that add comprehensive length validation during packet reception are available in ESP-IDF 5.4.2, 5.3.4, 5.2.6, and corresponding later point releases; the referenced commits document the exact changes. For ESP-IDF v5.3 and earlier branches, application code can mitigate exposure by checking that the data_len parameter passed to the RX callback registered via esp_now_register_recv_cb is positive before further processing. No application-level workaround exists for the v5.4 series, so upgrading is required.

EPSS remains low and unchanged at 0.0171 with no material upward trajectory after disclosure.

EU & UK References

Vulnerability Data

ESF-IDF is the Espressif Internet of Things (IOT) Development Framework. An integer underflow vulnerability has been identified in the ESP-NOW protocol implementation within the ESP Wi-Fi component of versions 5.4.1, 5.3.3, 5.2.5, and 5.1.6 of the ESP-IDF framework. This issue…

more

stems from insufficient validation of user-supplied data length in the packet receive function. Under certain conditions, this may lead to out-of-bounds memory access and may allow arbitrary memory write operations. On systems without a memory protection scheme, this behavior could potentially be used to achieve remote code execution (RCE) on the target device. In versions 5.4.2, 5.3.4, 5.2.6, and 5.1.6, ESP-NOW has added more comprehensive validation logic on user-supplied data length during packet reception to prevent integer underflow caused by negative value calculations. For ESP-IDF v5.3 and earlier, a workaround can be applied by validating that the `data_len` parameter received in the RX callback (registered via `esp_now_register_recv_cb()`) is a positive value before further processing. For ESP-IDF v5.4 and later, no application-level workaround is available. Users are advised to upgrade to a patched version of ESP-IDF to take advantage of the built-in mitigation.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1212 Exploitation for Credential Access Credential Access
Adversaries may exploit software vulnerabilities in an attempt to collect credentials.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-25532Same product: Espressif Esp-Idf
CVE-2026-45542Same product: Espressif Esp-Idf
CVE-2024-33453Same product: Espressif Esp-Idf
CVE-2025-55297Same product: Espressif Esp-Idf
CVE-2024-33454Same product: Espressif Esp-Idf
CVE-2026-25507Same product: Espressif Esp-Idf
CVE-2026-25508Same product: Espressif Esp-Idf
CVE-2026-46532Same product: Espressif Esp-Idf
CVE-2025-66409Same product: Espressif Esp-Idf
CVE-2026-45160Same product: Espressif Esp-Idf

Affected Assets

espressif
esp-idf
5.1.6, 5.2.5, 5.3.3, 5.4.1

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

Developer testing and static/dynamic analysis directly find integer underflow defects before code is released.

Security engineering principles require use of safe arithmetic constructs or language features that structurally eliminate integer underflow during subtraction.

Input validation can reject or sanitize values that would cause a subtraction to underflow the representable range.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 full match
prevents

Secure SDLC practices directly prevent integer underflow defects via input validation, bounds checking, and static analysis.

ID.RA-01 partial match
prevents

Vulnerability scanning and code analysis can surface underflow flaws after they are introduced.

PR.PS-02 partial match
prevents

Routine patching can remediate known underflow bugs once they are discovered in deployed software.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development catches integer underflow defects before release.

prevents

Secure development lifecycle mandates input validation and arithmetic checks that prevent integer underflow.

prevents

Application security requirements include bounds checking and safe arithmetic to avoid underflow conditions.

prevents

Secure architecture principles require defensive coding patterns that mitigate integer wraparound risks.

prevents

Secure coding standards directly prescribe safe integer handling and overflow/underflow prevention.

References