REDHAT-BUG-2453276: Low severity pypi/cryptography vulnerability
cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Prior to version 46.0.6, DNS name constraints were only validated against SANs within child certificates, and not the "peer name" presented during each validation. Consequently, cryptography would allow a peer named bar.example.com to validate against a wildcard leaf certificate for .example.com, even if the leaf's parent certificate (or upwards) contained an excluded subtree constraint for bar.example.com. This issue has been patched in version 46.0.6.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 46.0.6
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments using the PyPI cryptography package before version 46.0.6 may be affected when they validate certificate chains with DNS name constraints. The problematic case involves a wildcard leaf certificate and an excluded DNS subtree in a parent certificate.
What conditions are needed for exploitation?
A peer must be presented as a DNS name that falls under an excluded subtree, such as bar.example.com, while the certificate chain uses a wildcard leaf certificate such as *.example.com. A parent certificate in the chain must contain the relevant excluded subtree constraint.
What should be done to remediate the issue?
Upgrade cryptography to version 46.0.6 or later, which patches DNS name-constraint validation to check the peer name as well as certificate SANs.