Impact
The vulnerability is in the DNSConstraint::matches method of python-cryptography. For library versions 45.0.0 through 48.0.0, the verifier incorrectly treats a wildcard DNS subject alternative name, such as *.example.com, as matching a more specific permitted DNS name allowed by an intermediate CA (like foo.example.com). Because the wildcard can resolve to sibling names such as bar.example.com, the library accepts a certificate chain that should be rejected, allowing a domain constraint bypass. This flaw permits invalid certificates and can lead to man‑in‑the‑middle or impersonation attacks. The weakness is a CWE‑295 error in authorization logic.
Affected Systems
The python-cryptography package developed by the PyCA project is affected for all releases prior to version 49.0.0. Any application or service that imports this library for TLS/SSL certificate verification and is running an older version is vulnerable.
Risk and Exploitability
The CVSS score of 6.9 indicates a medium severity vulnerability, and the EPSS score indicates a very low exploitation probability (<1%), the flaw is not listed in the CISA KEV catalog. Exploitation is likely to occur in environments where python-cryptography performs hostname verification for TLS connections; an attacker who can supply a crafted certificate chain to a vulnerable application can cause the library to accept a chain that should be rejected, leading to unauthorized access or data compromise. The attack vector is inferred to be remote through application traffic that establishes TLS sessions using this library.
OpenCVE Enrichment
Github GHSA