Impact
The vulnerability lies in the DNSConstraint::matches function of the python-cryptography library, where a wildcard domain pattern (*.example.com) was incorrectly considered a match for a more specific permitted subtree such as foo.example.com. This flaw allows an attacker to supply a certificate chain that includes a wildcard entry seemingly valid under the intermediate CA but actually permitting sibling names like bar.example.com, thereby escaping the intended name constraints. The result is the acceptance of an invalid certificate chain, potentially enabling impersonation or man‑in‑the‑middle attacks. The weakness is a CWE‑295 type 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 although the EPSS score is not available, 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