mbedtls — security advisory
An issue was discovered in Mbed TLS before 2.24.0. The verification of X.509 certificates when matching the expected common name (the cn argument of mbedtls_x509_crt_verify) with the actual certificate name is mishandled: when the subjecAltName extension is present, the expected name is compared to any name in that extension regardless of its type. This means that an attacker could impersonate a 4-byte or 16-byte domain by getting a certificate for the corresponding IPv4 or IPv6 address (this would require the attacker to control that IP address, though).
- Products
- mbedtls
- Affected versions
- Not specified
- Fixed versions
- 2.28.0-0.3
- CVEs
- CVE-2020-36477
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 13:14 UTC · Revision 1
Source evidence
An issue was discovered in Mbed TLS before 2.24.0. The verification of X.509 certificates when matching the expected common name (the cn argument of mbedtls_x509_crt_verify) with the actual certificate name is mishandled: when the subjecAltName extension is present, the expected name is compared to any name in that extension regardless of its type. This means that an attacker could impersonate a 4-byte or 16-byte domain by getting a certificate for the corresponding IPv4 or IPv6 address (this would require the attacker to control that IP address, though).
osv:DEBIAN-CVE-2020-36477
mbedtls
Fixed versions: 2.28.0-0.3
mbedtls
Fixed versions: 2.28.0-0.3
mbedtls
Fixed versions: 2.28.0-0.3
Complete source record
{
"id": "56be45c6e6288de873cadf97c6811533095cca50d6d1c6fd89381375c28bc37e",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2020-36477",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2020-36477",
"summary": "An issue was discovered in Mbed TLS before 2.24.0. The verification of X.509 certificates when matching the expected common name (the cn argument of mbedtls_x509_crt_verify) with the actual certificate name is mishandled: when the subjecAltName extension is present, the expected name is compared to any name in that extension regardless of its type. This means that an attacker could impersonate a 4-byte or 16-byte domain by getting a certificate for the corresponding IPv4 or IPv6 address (this would require the attacker to control that IP address, though).",
"evidence": "osv:DEBIAN-CVE-2020-36477",
"products": [
{
"name": {
"value": "mbedtls",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.28.0-0.3",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "mbedtls",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.28.0-0.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "mbedtls",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2.28.0-0.3",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2020-36477",
"aliases": [
"DEBIAN-CVE-2020-36477"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.28.0-0.3"
}
]
}
],
"package": {
"name": "mbedtls",
"purl": "pkg:deb/debian/mbedtls?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-36477.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.28.0-0.3"
}
]
}
],
"package": {
"name": "mbedtls",
"purl": "pkg:deb/debian/mbedtls?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-36477.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2.28.0-0.3"
}
]
}
],
"package": {
"name": "mbedtls",
"purl": "pkg:deb/debian/mbedtls?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2020-36477.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-26T12:02:02.916643098Z",
"provider": "osv",
"upstream": [
"CVE-2020-36477"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2020-36477"
]
},
"related_cves": [
{
"value": "CVE-2020-36477",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 451972,
"published_at": "2021-08-23T02:15:07.043+00:00"
}