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
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2020-36477
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:12 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:CVE-2020-36477
Complete source record
{
"id": "248edae48d9ce1dc83ed54092c748a78e778f6e61d36641af35015017c32d77c",
"url": "https://osv.dev/vulnerability/CVE-2020-36477",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "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:CVE-2020-36477",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2020-36477",
"aliases": [
"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": [
{
"repo": "https://github.com/Mbed-TLS/mbedtls",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "523f0554b6cdc7ace5d360885c3f5bbcc73ec0e8"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:arm:mbed_tls:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "2.24.0"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"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-2020-36477.json"
}
},
{
"ranges": [
{
"repo": "https://github.com/mbed-tls/mbedtls",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "523f0554b6cdc7ace5d360885c3f5bbcc73ec0e8"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"fixed": "523f0554b6cdc7ace5d360885c3f5bbcc73ec0e8"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v2.24.0"
}
]
}
}
],
"versions": [
"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-2020-36477.json"
}
}
],
"modified": "2026-10-20T10:53:26.407230531Z",
"provider": "osv",
"references": [
"https://github.com/ARMmbed/mbedtls/issues/3498",
"https://github.com/ARMmbed/mbedtls/releases/tag/v2.24.0",
"https://security.gentoo.org/glsa/202301-08"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2020-36477",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 384310,
"published_at": "2021-08-23T02:15:07.043+00:00"
}