Security advisory
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).
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-47917
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 18:07 UTC · Revision 1
Source evidence
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).
osv:CVE-2025-47917
Complete source record
{
"id": "0d38afa1273b90d8e5b617d7e7b09bec649462ff3f7dc8c598efae977e4f8c7e",
"url": "https://osv.dev/vulnerability/CVE-2025-47917",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2025-47917",
"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).",
"evidence": "osv:CVE-2025-47917",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2025-47917",
"aliases": [
"CVE-2025-47917"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/Mbed-TLS/mbedtls",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "c765c831e5c2a0971410692f92f7a81d6ec65ec2"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:arm:mbed_tls:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.6.4"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v2.26.0",
"mbedtls-2.26.0",
"v2.24.0",
"mbedtls-2.24.0",
"mbedtls-2.19.1",
"mbedtls-2.22.0d0",
"mbedtls-2.21.0",
"mbedtls-2.20.0",
"mbedtls-2.20.0d0",
"mbedtls-2.19.0d2",
"mbedtls-2.19.0",
"mbedtls-2.19.0d1",
"mbedtls-2.16.0",
"mbedtls-2.14.0",
"mbedtls-2.13.1",
"mbedtls-2.13.0",
"mbedtls-2.12.0",
"mbedtls-2.11.0",
"mbedtls-2.10.0",
"mbedtls-2.7.0",
"mbedtls-2.9.0",
"mbedtls-2.8.0",
"mbedtls-2.8.0-rc1",
"mbedtls-2.7.0-rc1",
"mbedtls-2.6.0",
"mbedtls-2.6.0-rc1",
"mbedtls-2.5.1",
"mbedtls-2.5.0",
"mbedtls-2.4.0",
"mbedtls-2.2.1",
"yotta-2.3.1",
"mbedtls-2.3.0",
"mbedtls-2.2.0",
"mbedos-release-15-11",
"mbedos-techcon-oob2",
"mbedtls-2.1.2",
"mbedtls-2.1.0",
"mbedtls-2.1.1",
"beta-oob-2",
"mbedtls-2.0.0",
"polarssl-1.3.9",
"polarssl-1.3.8",
"polarssl-1.3.7",
"polarssl-1.3.6",
"polarssl-1.3.5",
"polarssl-1.3.4",
"polarssl-1.3.3",
"polarssl-1.3.2",
"polarssl-1.3.1",
"polarssl-1.3.0",
"polarssl-1.3.0-rc0",
"polarssl-1.2.6",
"polarssl-1.2.5",
"polarssl-1.2.4",
"polarssl-1.2.2",
"polarssl-1.2.1",
"polarssl-1.2.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-47917.json"
}
}
],
"modified": "2026-10-28T02:30:31.050663603Z",
"provider": "osv",
"references": [
"https://lists.debian.org/debian-lts-announce/2025/08/msg00013.html",
"https://lists.debian.org/debian-lts-announce/2025/08/msg00025.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/47xxx/CVE-2025-47917.json",
"https://github.com/Mbed-TLS/mbedtls-docs/blob/main/security-advisories/mbedtls-security-advisory-2025-06-7.md",
"https://mbed-tls.readthedocs.io/en/latest/tech-updates/security-advisories/",
"https://nvd.nist.gov/vuln/detail/CVE-2025-47917"
],
"provider_metadata": {
"cwe_ids": [
"CWE-416"
],
"cna_assigner": "mitre",
"unresolved_ranges": [
{
"extracted_events": [
{
"range": [
{
"fixed": "3.6.4"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
}
]
}
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/47xxx/CVE-2025-47917.json"
}
},
"related_cves": [
{
"value": "CVE-2025-47917",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 498233,
"published_at": "2025-07-20T00:00:00+00:00"
}