Use after free in mbedtls
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA. Impact type from CWE-416 and the CVSS impact.
Summary
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).
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA mbedtls (Mbed) Fixed in 3.6.4
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
Mbed mbedtls 3.6.4
3 records Highest priority Priority MEDIUM 1 MEDIUM, 2 LOW
Other records, highest priority first
- TI-2025-31103 NULL pointer dereference in mbedtlsPriority LOW 34
- TI-2025-31198 In Mbed TLS 3.6.1 through 3.6.3 before 3.6.4, a timing discrepancy in block cipher…Priority LOW 19
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2025-47917
- 2026-10-03 Alias added: GHSA-7xcg-xp2h-m42v
References
More Mbed vulnerabilities
- TI-2025-32620 Mbed TLS before 3.6.4 has a race condition in AESNI detection if certain compiler… CVSS 3.1HIGH 7.8
- TI-2019-12830 Buffer overflows were discovered in the CoAP library in Arm Mbed OS 5.14.0. CVSS 3.1CRITICAL 9.8
- TI-2019-12829 An integer overflow was discovered in the CoAP library in Arm Mbed OS 5.14.0. CVSS 3.1CRITICAL 9.8
- TI-2025-31103 NULL pointer dereference in mbedtls CVSS 3.1HIGH 7.5
- TI-2025-31614 Out-of-bounds read in mbedtls CVSS 3.1MEDIUM 6.5
- TI-2025-20584 Use of uninitialized resource in mbedtls CVSS 3.1MEDIUM 5.4
Sources
- CVE-2025-47917 · CVE Program
- CVE-2025-47917 · NVD
- FIRST EPSS
- GHSA-7xcg-xp2h-m42v · GitHub Advisory Database · CC BY 4.0
- CVE-2025-47917 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences