REDHAT-BUG-2510815: High severity pypi/cryptography vulnerability
python-cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Prior to 49.0.0, when resolving invalid certificate chains that include duplicate copies of self-signed certificates, the processing recursively invokes the same candidate, leading to an exponential blowup. Although the limitation that the chain depth cannot exceed a specified maximum depth prevents unbounded recursion and guarantees termination, an attacker-controlled certificate chain can lead the processing to easily take more than 5s to reject in testing. This amplification could form the basis for a resource exhaustion denial of service attack. The core issue arises in the recursive nature of buildchaininner, which does not de-duplicate against previously analyzed candidates. As the correctness of validation is not affected, the integrity of a system cannot be compromised through this vector, only its availability. This issue is fixed in 49.0.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
python-cryptographyto a version that resolves this vulnerability.Fixed in 49.0.0
Event History
Frequently Asked Questions
Who is realistically exposed to this denial-of-service issue?
Systems using python-cryptography to resolve or validate attacker-controlled certificate chains are exposed. The issue affects versions prior to 49.0.0.
What must an attacker provide to trigger the excessive processing?
An attacker needs to supply an invalid certificate chain containing duplicate copies of self-signed certificates. The duplicate candidates cause recursive chain processing to revisit the same candidate and produce exponential work.
Can this vulnerability compromise certificate-validation integrity or other system data?
No. The provided information states that validation correctness is not affected; the impact is limited to availability through resource exhaustion.
What should be done to remediate the issue?
Upgrade python-cryptography to version 49.0.0 or later, where the issue is fixed.