CVE-2025-66220: Envoy’s TLS certificate matcher for `match_typed_subject_alt_names` may incorrectly treat certificates containing an embedded null byte
Summary Envoy’s mTLS certificate matcher for matchtypedsubjectaltnames may incorrectly treat certificates containing an embedded null byte (\0) inside an OTHERNAME SAN value as valid matches.
Details This occurs when the SAN is encoded as a BMPSTRING or UNIVERSALSTRING, and its UTF-8 conversion result is truncated at the first null byte during string assignment. As a result, "victim\0evil" may match an exact: "victim" rule and be accepted by Envoy.
PoC
Create a CA and a server certificate signed by that CA. Create two client certificates signed by the same CA: clientevil with OTHERNAME BMPSTRING = "evil" clientnull with OTHERNAME BMPSTRING = "victim\0evil" Configure Envoy with requireclientcertificate: true and a matchtypedsubjectaltnames entry for the OTHERNAME OID with matcher.exact: "victim". Connect without a client cert → connection rejected. Connect with clientevil → connection rejected. Connect with clientnull → connection accepted (but shouldn't!).
Impact An attacker who can obtain a trusted client certificate with a null byte embedded in an OTHERNAME SAN can exploit this vulnerability. The practical impact is unauthorized impersonation of the matched identity, enabling access to services or APIs protected by that exact OTHERNAME check.
Credit markevich.nikita1@gmail.com
Other sources
Envoy is a high-performance edge/middle/service proxy. In 1.33.12, 1.34.10, 1.35.6, 1.36.2, and earlier, Envoy’s mTLS certificate matcher for matchtypedsubjectaltnames may incorrectly treat certificates containing an embedded null byte (\0) inside an OTHERNAME SAN value as valid matches.
— MITRE
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-66220?
CVE-2025-66220 is classified as a high-severity vulnerability due to potential bypass of mTLS certificate validation.
How do I fix CVE-2025-66220?
To fix CVE-2025-66220, upgrade to Envoy versions 1.33.13, 1.34.11, 1.35.7, or 1.36.3 or later.
What software is affected by CVE-2025-66220?
CVE-2025-66220 affects Envoy Proxy versions up to 1.33.12 and from 1.34.10 to 1.36.2.
What type of vulnerability is CVE-2025-66220?
CVE-2025-66220 is a security vulnerability related to certificate validation in mTLS.
Is CVE-2025-66220 a practical risk?
Yes, CVE-2025-66220 poses a practical risk as it may allow attackers to use malformed certificates for authentication.