Skip to main content
VulnerabilityPublished Updated

CVE-2025-47917: Mbed mbedtls · Use After Free

Affects Mbed mbedtlsSource CVE Database V5

0

Public exploit available (Exploit-DB) · CVSS 8.9 High : upgrade to 3.6.4 as a priority.

Data as of 26 Oct 2026, 10:12 UTC

CVSS 3.1 base score
8.9High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
2.4% chance of exploitation in 30 days – higher than 84% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 3.6.4
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:H

Exploitation evidence

t = 0 is the CVE’s publication on cve.org

  1. Disclosed: evidence found.

    CVE published 20 Jul 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  4. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

Timeline

  1. CVE ID reserved

    by MITRE Corporation

    , 67 days before disclosure

  2. CVE published

    on cve.org

    , t = 0

  3. In Threat Radar

    record ingested

    , the same day as disclosure

  4. First Exploit-DB entry (opens in a new tab)

    Mbed TLS 3.6.4 - Use-After-Free

    , 58 days after disclosure

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade mbed-tls/mbedtls to 3.6.4.

Affected software

ProductAffectedFixed in
GitHubmbed-tls/mbedtlspkg:github/mbed-tls/mbedtlsOther threatsAffected
  • <3.6.4
Fixed in
  • 3.6.4

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

The primary mitigation is to upgrade all affected Mbed TLS instances to version 3.6.4 or later, where the use-after-free issue has been corrected. Organizations should audit their codebases for usage of the mbedtls_x509_string_to_names() function, especially in contexts handling multiple Distinguished Names in SAN strings, to ensure no unsafe pointer references persist after function calls. Developers should avoid relying solely on documentation and verify actual function behaviors through code review and testing. Implementing memory safety checks and employing tools such as AddressSanitizer during development can help detect use-after-free conditions. For embedded and IoT devices where immediate upgrades are challenging, applying runtime protections like Control Flow Integrity (CFI) and deploying network-level intrusion detection systems to monitor anomalous TLS certificate processing may reduce risk.

Description

Mbed TLS before 3.6.4 allows a use-after-free in certain situations of applications that are developed in accordance with the documentation. The function mbedtls_x509_string_to_names() takes a head argument that is documented as an output argument. The documentation does not suggest that the function will free that pointer; however, the function does call mbedtls_asn1_free_named_data_list() on that argument, which performs a deep free(). As a result, application code that uses this function (relying only on documented behavior) is likely to still hold pointers to the memory blocks that were freed, resulting in a high risk of use-after-free or double-free. In particular, the two sample programs x509/cert_write and x509/cert_req are affected (use-after-free if the san string contains more than one DN).

References

Community reviews

Loading reviews…