CVE-2025-47917 Use after free in mbedtls

High 8.9 Published Updated

A use-after-free vulnerability in Mbed TLS allows attackers to potentially execute code or cause denial of service via crafted X.509 certificates.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-47917?

CVE-2025-47917 is a high-severity use after free vulnerability in Arm Mbed Tls, published on 20 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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).

Weakness: CWE-416

Which versions are affected by CVE-2025-47917?

It affects 1 product.

Products include Arm Mbed Tls.

How do I fix CVE-2025-47917?

Upgrade to a fixed version.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-47917 being exploited?

There is no known exploitation of CVE-2025-47917 in the wild and no public exploit code.

Public exploit code: 1 Exploit-DB entry and 1 proofs of concept on GitHub.

All Arm Mbed Tls vulnerabilities

Sources

Also known as ALPINE-CVE-2025-47917, DEBIAN-CVE-2025-47917, DLA-4274-2, GHSA-7xcg-xp2h-m42v, JLSEC-2025-231, ROOT-OS-DEBIAN-12-CVE-2025-47917 and 1 more.

Is CVE-2025-47917 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free