CVE-2025-66220: Github.com/envoyproxy/envoy Envoy's TLS Certificate Matcher For Vulnerability
MODERATECVE-2025-66220 is a MODERATE (CVSS 5.0) envoy's tls certificate matcher for vulnerability (CWE-170: Improper Null Termination) affecting Github.com/envoyproxy/envoy libraries in the Go ecosystem. The issue involves envoy's tls certificate matcher for `match_typed_subject_alt_names` may incorrectly treat certificates containing an embedded null byte. Remediation is available by upgrading affected packages to version 1.36.3, 1.35.7, 1.34.11, 1.33.13.
CVE-2025-66220 at a Glance
Security Impact
CVSS: 5.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2025-66220
To remediate this vulnerability, upgrade all affected Github.com/envoyproxy/envoy dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/envoyproxy/envoy to 1.36.3
Upgrade github.com/envoyproxy/envoy to 1.35.7
Upgrade github.com/envoyproxy/envoy to 1.34.11
Upgrade github.com/envoyproxy/envoy to 1.33.13
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/envoyproxy/envoy
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-66220, inspect your project dependencies for Github.com/envoyproxy/envoy:
inspect dependencies for github.com/envoyproxy/envoy
Analyze the terminal output to locate any version of Github.com/envoyproxy/envoy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.36.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-170: Improper Null Termination, where the product does not terminate or incorrectly terminates a string or array with a null character or equivalent terminator. In Github.com/envoyproxy/envoy, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-66220 Affected Github.com/envoyproxy/envoy Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/envoyproxy/envoy
|
Go |
≥ 1.36.0
< 1.36.3
|
1.36.3
|
|
github.com/envoyproxy/envoy
|
Go |
≥ 1.35.0
< 1.35.7
|
1.35.7
|
|
github.com/envoyproxy/envoy
|
Go |
≥ 1.34.0
< 1.34.11
|
1.34.11
|
|
github.com/envoyproxy/envoy
|
Go |
< 1.33.13
|
1.33.13
|
References
Frequently Asked Questions
What is CVE-2025-66220?
Which Github.com/envoyproxy/envoy versions are affected?
What version fixes CVE-2025-66220?
Is github.com/envoyproxy/envoy affected?
What is the CVSS score of CVE-2025-66220?
What CWE is associated with CVE-2025-66220?
How can I check Go dependencies for CVE-2025-66220?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rwjg-c3h2-f57p",
"modified" : "2025-12-05T18:14:03Z",
"published" : "2025-12-05T18:14:02Z",
"aliases" : [ "CVE-2025-66220" ],
"summary" : "Envoy's TLS certificate matcher for `match_typed_subject_alt_names` may incorrectly treat certificates containing an embedded null byte",
"details" : "### Summary\nEnvoy’s mTLS certificate matcher for `match_typed_subject_alt_names` may incorrectly treat certificates containing an embedded null byte (\\0) inside an `OTHERNAME` SAN value as valid matches.\n\n### Details\nThis 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.\n\n### PoC\n\nCreate a CA and a server certificate signed by that CA.\nCreate two client certificates signed by the same CA:\nclient_evil with OTHERNAME BMPSTRING = \"evil\"\nclient_null with OTHERNAME BMPSTRING = \"victim\\0evil\"\nConfigure Envoy with require_client_certificate: true and a match_typed_subject_alt_names entry for the OTHERNAME OID with matcher.exact: \"victim\".\nConnect without a client cert → connection rejected.\nConnect with client_evil → connection rejected.\nConnect with client_null → connection accepted (but shouldn't!).\n\n### Impact\nAn 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.\n\n### Credit\n[markevich.nikita1@gmail.com](mailto:markevich.nikita1@gmail.com)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/envoyproxy/envoy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.36.0"
}, {
"fixed" : "1.36.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.36.2"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/envoyproxy/envoy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.35.0"
}, {
"fixed" : "1.35.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.35.6"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/envoyproxy/envoy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.34.0"
}, {
"fixed" : "1.34.11"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.34.10"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/envoyproxy/envoy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.33.13"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.33.12"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/envoyproxy/envoy/security/advisories/GHSA-rwjg-c3h2-f57p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66220"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/envoyproxy/envoy"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-170" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-05T18:14:02Z",
"nvd_published_at" : "2025-12-03T19:15:58Z"
}
}