CVE-2025-47917 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 ar...
- Published
- Updated
- Exploit status
- Public exploit available
- CISA SSVC
- No known exploitation · automatable: no · technical impact: total
- Technology
- UbuntuDebian
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).
Upgrade path
14 packages: 12 fixed, 2 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| azure linux qemu(Azure Linux 3.0) | All versions | No fix listed | No fix yet |
| debian/mbedtls(Debian 12) | = 2.28.3-1; = 2.28.4-1; = 2.28.5-1; = 2.28.6-1 +19 more | No fix listed | No fix yet |
| alpine/mbedtls(Alpine v3.20) | < 3.6.4-r0 | 3.6.4-r0 | Fixed |
| alpine/mbedtls(Alpine v3.21) | < 3.6.4-r0 | 3.6.4-r0 | Fixed |
| alpine/mbedtls(Alpine v3.22) | < 3.6.4-r0 | 3.6.4-r0 | Fixed |
| alpine/mbedtls(Alpine v3.23) | < 3.6.4-r0 | 3.6.4-r0 | Fixed |
| alpine/mbedtls(Alpine v3.24) | < 3.6.4-r0 | 3.6.4-r0 | Fixed |
| alpine/mbedtls3(Alpine v3.24) | < 3.6.4-r0 | 3.6.4-r0 | Fixed |
| Arm Ltd mbed tls | < 3.6.4 | 3.6.4 | Fixed |
| debian/mbedtls(Debian 13) | < 3.6.4-1 | 3.6.4-1 | Fixed |
| debian/mbedtls(Debian 14) | < 3.6.4-1 | 3.6.4-1 | Fixed |
| mbedtls | < 3.6.4 | 3.6.4 | Fixed |
| ubuntu/mbedtls(Ubuntu 22.04) | < 2.28.0-1ubuntu0.1~esm1 | 2.28.0-1ubuntu0.1~esm1 | Fixed |
| ubuntu/mbedtls(Ubuntu 24.04) | < 2.28.8-1ubuntu0.1~esm1 | 2.28.8-1ubuntu0.1~esm1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| azure linux qemu(Azure Linux:3.0) | All versions | No fix listed |
| debian/mbedtls(Debian:12) | All versions | No fix listed |
| debian/mbedtls(Debian:12) | = 2.28.3-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 2.28.4-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 2.28.5-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 2.28.6-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 2.28.7-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 2.28.7-1.1 | No fix listed |
| debian/mbedtls(Debian:12) | = 2.28.7-1.1~exp1 | No fix listed |
| debian/mbedtls(Debian:12) | = 2.28.8-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.0-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.0-2 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.0-3 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.2-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.2-2 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.2-3 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.3-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.4-1 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.4-2 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.5-0.1 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.5-0.1~deb13u1 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.6-0.1 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.7-2 | No fix listed |
| debian/mbedtls(Debian:12) | = 3.6.7-3 | No fix listed |
| debian/mbedtls(Debian:13) | < 3.6.4-1 | 3.6.4-1 |
Show 11 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/mbedtls(Debian:14) | < 3.6.4-1 | 3.6.4-1 |
| mbedtls | < 3.6.4 | 3.6.4 |
| ubuntu/mbedtls(Ubuntu:22.04) | < 2.28.0-1ubuntu0.1~esm1 | 2.28.0-1ubuntu0.1~esm1 |
| alpine/mbedtls(Alpine:v3.20) | < 3.6.4-r0 | 3.6.4-r0 |
| alpine/mbedtls(Alpine:v3.21) | < 3.6.4-r0 | 3.6.4-r0 |
| alpine/mbedtls(Alpine:v3.22) | < 3.6.4-r0 | 3.6.4-r0 |
| alpine/mbedtls(Alpine:v3.23) | < 3.6.4-r0 | 3.6.4-r0 |
| alpine/mbedtls(Alpine:v3.24) | < 3.6.4-r0 | 3.6.4-r0 |
| alpine/mbedtls3(Alpine:v3.24) | < 3.6.4-r0 | 3.6.4-r0 |
| ubuntu/mbedtls(Ubuntu:24.04) | < 2.28.8-1ubuntu0.1~esm1 | 2.28.8-1ubuntu0.1~esm1 |
| Arm Ltd mbed tls | < 3.6.4 | 3.6.4 |
References
- Debian Security Tracker CVE-2025-47917 vendor-advisory
- bugs.debian.org issue-tracking
- MSRC Security Update Guide vendor-advisory
- Security Update patch
- mbed-tls.readthedocs.io vendor-advisory
- github.com mitigation third-party-advisory
- lists.debian.org
- lists.debian.org
- Ubuntu CVE tracker vendor-advisory
- USN-8123-1 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory