Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

pyca/cryptography
main @ 4f4ad60
67
Fixes
11
CVEs
CRITICAL
Peak severity
60.6%
Coverage
Highlights
Cryptographic Issues: 17 prior fixes. Scrutinize any change in this area.
cryptography-x509-verification: most-fixed (8 issues). Treat as high-risk during review.
22 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Auth Bypass: The X.509 verification logic has experienced repeated vulnerabilities involving name constraint validation, such as failing to reject critical unsupported directoryName constraints, mishandling wildcard DNS SANs, and failing to enforce mandatory basicConstraints or SAN checks across customized policies. These gaps allow certificates to bypass path validation policies.
Memory Safety: Interoperability between Python and Rust has introduced several critical use-after-free and lifetime issues when extracting Python objects (like strings or byte arrays) over the FFI boundary, requiring the adoption of PyBacked types to anchor memory lifetimes.
Cryptographic Issues: AEAD implementation bugs in GCM mode, such as accepting truncated authentication tags or zero-length initialization vectors, degrade cryptographic strength and expose decryptors to signature forgery and key compromise.