Executive brief
A vulnerability in the popular Python 'cryptography' library can allow an attacker to crash or slow down a service by providing a specially crafted security certificate. The library fails to efficiently process certain types of invalid certificate chains, leading to excessive CPU usage. This can result in a denial-of-service (DoS) where the application becomes unresponsive to legitimate users.
Technical details
A resource exhaustion vulnerability exists in the X.509 path-building logic of the cryptography library. The `build_chain_inner` function, which is part of the certificate verification process, recursively invokes itself without de-duplicating previously analyzed candidates when resolving invalid chains with duplicate self-signed certificates. While a maximum chain depth exists to prevent infinite recursion, the exponential growth in path-building attempts allows an attacker to trigger significant processing delays (e.g., >5 seconds for a small chain). This can be exploited remotely by providing a crafted certificate chain to any service performing X.509 validation using the affected library. The issue is fixed in version 49.0.0 by tracking and skipping already-seen valid issuers during recursion.
Affected products
- pyca cryptography <= 48.0.0
Timeline
- 2026-07-31: advisory: GitHub Advisory published
- 2026-08-03: disclosed: CVE-2026-69249 disclosed
- 2026-08-03: patched: Fixed in version 49.0.0