Esp IdfApplication · Espressif

CVE-2025-52471

CRITICAL · 9.8 CVSS v3.1 Published 2025-06-24
Patch available
A vendor patch is available. No clean upgrade release — apply the published patch.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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 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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Integer underflow vulnerability in ESP-NOW protocol in ESP-IDF versions 5.4.1, 5.3.3, 5.2.5, and 5.1.6 stems from insufficient validation of user-supplied data length in the packet receive function. This can lead to out-of-bounds memory access and arbitrary memory write operations, potentially enabling RCE on devices without memory protection.

MitigationUpgrade ESP-IDF to versions 5.4.2, 5.3.4, 5.2.6, or 5.1.6. For ESP-IDF v5.3 and earlier, a workaround exists: validate that the data_len parameter in the RX callback is positive before processing.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Esp IdfApplication
Affected:= 5.1.6= 5.2.5= 5.3.3= 5.4.1

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check ESP-IDF version
    Inspect the ESP-IDF version installed or referenced in the project (e.g., check version.h, sdkconfig, or the IDF_PATH/version.txt file)
    Affected if Version matches 5.1.6, 5.2.5, 5.3.3, or 5.4.1 exactly
  2. Verify ESP-NOW is enabled
    Check if CONFIG_ESP_NOW_ENABLED is set to y in sdkconfig or sdkconfig.h, or verify the project includes and initializes ESP-NOW functionality (esp_now.h)
    Affected if ESP-NOW protocol is compiled into or actively used by the firmware
  3. Inspect RX callback for data_len validation
    Locate the ESP-NOW receive callback function registered via esp_now_register_recv_cb and examine whether data_len is validated before use (e.g., checked to be > 0 or within expected bounds)
    Affected if The RX callback processes data_len without first verifying it is a positive, expected value
  4. Check for safe data_len handling
    Search the codebase for length validation logic before memcpy, buffer access, or other data_len-dependent operations in ESP-NOW handlers
    Affected if No validation exists and data_len is used directly in memory operations

A user is affected if they are running an affected ESP-IDF version (5.1.6, 5.2.5, 5.3.3, or 5.4.1) with ESP-NOW enabled and the RX callback does not validate that data_len is a positive value before processing.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Patch available Apply the vendor patch
Vendor patch github.com →
Interim mitigation

Upgrade ESP-IDF to versions 5.4.2, 5.3.4, 5.2.6, or 5.1.6. For ESP-IDF v5.3 and earlier, a workaround exists: validate that the data_len parameter in the RX callback is positive before processing.

Recommended fix High confidence

ESP-IDF v5.4.2 (or v5.3.4/v5.2.6/v5.1.7 depending on your branch)

  1. Check current ESP-IDF version by running `idf.py --version` or checking the `idf_version.txt` file in the project
  2. If using a version below 5.4.2, upgrade to ESP-IDF 5.4.2 or later: `git fetch origin` and `git checkout v5.4.2` followed by `./install.sh` and `export.sh`
  3. If using ESP-IDF 5.3.x, upgrade to version 5.3.4 or later: `git checkout v5.3.4` followed by `./install.sh` and `export.sh`
  4. If using ESP-IDF 5.2.x, upgrade to version 5.2.6 or later: `git checkout v5.2.6` followed by `./install.sh` and `export.sh`
  5. If using ESP-IDF 5.1.x, upgrade to version 5.1.7 or later: `git checkout v5.1.7` followed by `./install.sh` and `export.sh`
  6. After upgrade, rebuild the project with `idf.py fullclean` and `idf.py build` to ensure the new ESP-IDF components are used
  7. Verify the fix is applied by checking that the patched commit b1a379d57430d265a53aca13d59ddfbf2e7ac409 is included in the new version
Caveat Minor version upgrades within the same major.minor series typically have minimal breaking changes, but always review the release notes for your target version before upgrading production devices

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Esp Idf Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA2.0 h
20.0 hours of engineering $3,500
Get the patch applied

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,600.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-52471 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-52471 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data