Aug 3, 2026·5 min read·247 visits
Unauthenticated remote attackers can cause complete CPU exhaustion and Denial of Service (DoS) on endpoints using python-cryptography by submitting malformed certificate chains containing duplicate self-signed intermediates, triggering an exponential path-building backtracking loop.
An uncontrolled resource consumption vulnerability (CWE-400) exists in the python-cryptography library's Rust-based X.509 verification engine. The flaw allows unauthenticated remote attackers to trigger severe CPU exhaustion and Denial of Service (DoS) by supplying specially crafted certificate chains containing duplicate self-signed certificates, forcing the recursive path builder into an exponential state-search loop.
The python-cryptography library utilizes a Rust-based path validation module, cryptography-x509-verification, to construct and validate certificate paths from an end-entity leaf certificate back to a trusted anchor.
This engine exposes a critical attack surface on any server, application, or gateway that accepts client certificates, validates S/MIME signatures, or performs custom X.509 validations on untrusted user-supplied certificate inputs.
The vulnerability is classified under CWE-400: Uncontrolled Resource Consumption. Under adversarial conditions, the verification engine is susceptible to algorithmic complexity exploitation, wherein a relatively short, maliciously structured validation chain triggers high CPU usage and complete system unavailability.
The path building process in ChainBuilder::potential_issuers functions by mapping subject names to find candidate parents from the trust store and the untrusted intermediate certificate pool.
Prior to version 49.0.0, when the pool of untrusted intermediates contained multiple identical or structurally identical copies of a self-signed certificate, the potential_issuers method retrieved and processed each duplicate independently.
Because the recursive function build_chain_inner failed to deduplicate these candidate issuers or bound the number of cryptographic signature operations, the resolver entered a recursive backtracking search. For $k$ duplicate intermediate certificates and a maximum path search depth $d$, the engine performs up to $k^d$ recursive states and corresponding signature validations. This combinatorial explosion quickly saturates the host CPU.
The vulnerability was resolved in commit 4a12cf49675a184e47f912b00b04f3a629283582 by implementing two complementary mitigation policies within the Rust engine.
First, a global signature validation budget of 128 check operations is introduced. Every signature verification decrements this budget, preventing unbound verification cycles. Second, candidate parent certificates are sorted and prioritized based on matching authority and subject key identifiers (AKI/SKI), pushing unlikely or duplicate name-colliding certificates to the bottom of the evaluation list.
Below is the structured representation of the path traversal workflow showing how validation flow has been bounded:
Let us review the key differences in src/rust/cryptography-x509-verification/src/lib.rs:
struct Budget {
name_constraint_checks: usize,
+ signature_checks: usize,
}
impl Budget {
+ const DEFAULT_SIGNATURE_CHECK_LIMIT: usize = 1 << 7; // Max 128 checks
+ fn signature_check<'chain, B: CryptoOps>(&mut self) -> ValidationResult<'chain, (), B> {
+ self.signature_checks = self.signature_checks.checked_sub(1).ok_or_else(|| {
+ ValidationError::new(ValidationErrorKind::FatalError(
+ "Exceeded maximum signature check limit",
+ ))
+ })?;
+ Ok(())
+ }
}The implementation of potential_issuers now performs a stable sort to group the most viable candidate issuers first, using AKI-to-SKI matching:
- fn potential_issuers(
- &self,
- cert: &'a VerificationCertificate<'chain, B>,
- ) -> impl Iterator<Item = &'a VerificationCertificate<'chain, B>> + '_ {
+ fn potential_issuers(
+ &self,
+ cert: &'a VerificationCertificate<'chain, B>,
+ cert_extensions: &Extensions<'chain>,
+ ) -> Vec<&'a VerificationCertificate<'chain, B>> {
+ let mut candidates: Vec<&'a VerificationCertificate<'chain, B>> = self
+ .store
+ .get_by_subject(&cert.certificate().tbs_cert.issuer)
+ .iter()
+ .chain(self.intermediates.iter().filter(|&candidate| {
+ candidate.certificate().subject() == cert.certificate().issuer()
+ }))
+ .collect();
+
+ let want_kid: Option<&[u8]> = cert_extensions
+ .get_extension(&AUTHORITY_KEY_IDENTIFIER_OID)
+ .and_then(|ext| ext.value::<AuthorityKeyIdentifier<'_, Asn1Read>>().ok())
+ .and_then(|aki| aki.key_identifier);
+
+ candidates.sort_by_key(|candidate| {
+ let have_kid: Option<&[u8]> =
+ candidate.certificate().extensions().ok().and_then(|exts| {
+ exts.get_extension(&SUBJECT_KEY_IDENTIFIER_OID)
+ .and_then(|ext| ext.value::<&[u8]>().ok())
+ });
+
+ match (want_kid, have_kid) {
+ (Some(want), Some(have)) if want == have => 0, // Match (high priority)
+ (Some(_), Some(_)) => 2, // Mismatch (low priority)
+ _ => 1u8, // Missing ID (medium priority)
+ }
+ });
+ candidates
+ }Exploitation does not require authentication or elevated privileges. An attacker simply submits a structured certificate chain containing several duplicates of a self-signed certificate.
Because the path validation engine explores all possible path combinations recursively, the CPU time increases exponentially relative to the number of duplicates. If the target server uses the unpatched verification engine, this process will block the executing thread indefinitely or until it hits a global worker timeout.
To demonstrate the vulnerability, the following performance table measures the validation duration of the unpatched vs. the patched library configuration:
| Duplicates | Max Search Depth | Unpatched Execution Time | Patched Execution Time |
|---|---|---|---|
| 1 | 7 | 0.00046 seconds | 0.00066 seconds |
| 2 | 7 | 0.02515 seconds | 0.00122 seconds |
| 3 | 7 | 0.48992 seconds | 0.00161 seconds |
| 4 | 7 | 4.30940 seconds | 0.00214 seconds |
| 3 | 8 | 1.46819 seconds | 0.00181 seconds |
| 4 | 8 | TIMEOUT (> 5.00s) | 0.00241 seconds |
| 5 | 7 | TIMEOUT (> 5.00s) | 0.00264 seconds |
| 6 | 6 | TIMEOUT (> 5.00s) | 0.00282 seconds |
Although the patch addresses the exponential explosion of cryptographic signature verification, some architectural edge cases remain.
First, potential_issuers continues to load and copy all matching intermediate certificates into a heap-allocated Vec before sorting. An attacker who uploads a chain with thousands of candidates can still force the server to allocate memory and perform $O(N \log N)$ operations. However, this is significantly less intensive than cryptographic signature operations.
Second, the name constraint budget of $2^{20}$ checks remains large. In highly complex, nested name constraint topologies, verification tasks could still introduce non-trivial latency overhead, though not sufficient to trigger a prolonged Denial of Service.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
cryptography PyCA | < 49.0.0 | 49.0.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-400 |
| Attack Vector | Network (AV:N) |
| CVSS v4.0 Score | 8.7 (High) |
| Impact | Denial of Service (DoS) via CPU Exhaustion |
| Exploit Status | Proof-of-Concept (PoC) available |
| KEV Status | Not listed on CISA KEV |
The software does not properly control the allocation and maintenance of a limited resource, enabling an actor to influence the amount of resources consumed and leading to a denial of service.
Silverstripe Framework prior to version 6.2.13 contains an improper privilege management vulnerability (CWE-269) within the Group authorization and validation logic. A delegated administrator possessing the CMS_ACCESS_SecurityAdmin permission, but lacking full ADMIN privileges, can edit or reparent groups that acquire administrative capabilities indirectly via permission roles or ancestor inheritance. By adding their own account to such a group or moving a controlled group underneath a role-privileged parent, the user escalates to full administrative access across the CMS.
A missing authorization and type validation vulnerability in Silverstripe Framework prior to version 6.2.13 allows authenticated CMS users to convert database records into arbitrary DataObject classes via user-controlled ClassName parameters in GridField detail forms.
CVE-2026-91115 (GHSA-c94f-87xg-65wf) is an unsafe reflection vulnerability in the Silverstripe Framework affecting versions 6.0.0 prior to 6.2.13. The built-in development task i18nTextCollectorTask passes the user-supplied 'writer' parameter directly to Silverstripe's dependency injection container (Injector::inst()->get()) without verifying that the requested class implements the expected Writer interface. Because the dependency injector supports instantiating arbitrary classes with attacker-supplied constructor arguments, and because nested task URLs bypassed interactive confirmation middleware, an attacker can achieve remote code execution via unauthenticated requests on development instances or via Cross-Site Request Forgery (CSRF) against authenticated administrators on production instances.
CVE-2026-129237 is a partial path traversal (Zip Slip) vulnerability in qbee-agent, the device agent for the qbee.io IoT device management platform. Prior to version 2026.41, the tar archive extraction routine in app/utils/tar.go used strings.HasPrefix without enforcing a directory separator boundary. When the Docker Compose bundle configuration has UseContext enabled, an authenticated user with delegated configuration or file management privileges can supply a crafted tar archive containing sibling-prefix traversal sequences, allowing directory creation and file writes into adjacent sibling directories outside the intended extraction root.
CVE-2026-128118 (GHSA-m9j8-jcmv-hp69) is an information disclosure vulnerability affecting the SvelteKit framework (@sveltejs/kit) from version 3.0.0 through 3.1.0. A design flaw in the build-time Vite module guard plugin (plugin_guard) failed to register src/params.js as a client entry point and implemented a fail-open validation model. Consequently, server-only modules and private environment variables imported directly or dynamically within parameter matchers were compiled into publicly accessible client-side JavaScript bundles without triggering a build error.
CVE-2026-128071 is a route-rule authorization bypass and security policy circumvention vulnerability in the Nuxt web framework, affecting `nuxt`, `@nuxt/nitro-server`, and `@nuxt/vite-server` prior to version 4.6.4. Serving as an incomplete fix for GHSA-6gq8-jgmh-3ffp, the flaw arises from an interpretation conflict between Nuxt's route-rule matching logic and Vue Router's catch-all route parameter decoding. When processing an incoming HTTP request containing percent-encoded forward slashes (`%2F` or `%2f`), the route-rule evaluation engine preserves the encoded sequence as a single path segment, failing to match prefix-based rules such as `/admin/**`. However, when the request is subsequently dispatched to a catch-all page route (`app/pages/[...slug].vue`) or a multi-segment parameter handler, the parameters are URL-decoded into literal slash delimiters. This discrepancy allows unauthenticated remote attackers to bypass route-level redirects, authentication middleware (`appMiddleware`), security headers, proxy configurations, and rendering constraints (`ssr: false`, `noScripts`), while the catch-all page resolves and renders the protected resource.