Skip to main content

python-cryptography CVE-2026-69248

| EUVDEUVD-2026-52448 MEDIUM
Improper Certificate Validation (CWE-295)
2026-08-03 GitHub_M GHSA-m2h6-j472-rp4c
6.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain certificate from constrained intermediate CA
  2. Delivery
    Craft leaf cert with *.example.com wildcard SAN
  3. Exploit
    Present crafted chain to python-cryptography PolicyBuilder verifier
  4. Execution
    DNSConstraint::matches incorrectly accepts wildcard as satisfying foo.example.com constraint
  5. Persist
    Verifier accepts invalid chain
  6. Impact
    Impersonate sibling domains outside permitted scope

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate validation
Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the verifying application must use python-cryptography's native X.509 verification API (cryptography.x509.verification.PolicyBuilder and Store), not OpenSSL-backed verification; (2) the certificate chain must include an intermediate CA whose BasicConstraints marks it as a CA and whose NameConstraints extension specifies a permittedSubtrees list containing a specific DNS name (e.g., foo.example.com); and (3) the attacker must present or obtain a leaf certificate issued under that constrained sub-CA bearing a wildcard DNS SAN broader than the constraint (e.g., *.example.com). Exploitation is entirely blocked for applications that verify certificates through OpenSSL's engine. No user interaction is required once the crafted chain is presented. The principal limiting factor is that the attacker must control or obtain a certificate issued by the constrained intermediate CA, which typically implies prior compromise or authorized access to that CA's issuance process.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N) scores 6.9 with high integrity impact, reflecting the ability to present certificates as valid for domains outside the constrained sub-CA's permitted scope. AT:P (Attack Requirements: Present) is the critical moderating factor - exploitation requires the verifying application to use python-cryptography's PolicyBuilder/Store API and the certificate chain must include an intermediate CA with a permittedSubtrees Name Constraints extension. This is a non-default PKI configuration found primarily in enterprise, government, and regulated-industry PKI hierarchies. The E:P modifier confirms a public PoC exists, lowering exploitation bar for capable attackers. No EPSS score was provided in the input, so exploitation probability cannot be quantified. This is NOT in the CISA KEV catalog. Real-world impact is significant where Name Constraints enforcement is a security control, but the attack requires controlling a certificate issued under the constrained sub-CA - a meaningful limiting factor. For most deployments that verify certificates via OpenSSL's own engine rather than pyca's pure-Python/Rust verifier, this issue does not apply.

Exploit ScenarioDerived

An attacker who has been issued a certificate by a constrained intermediate CA (permitted subtree: foo.example.com) requests or forges a leaf certificate with a wildcard SAN of *.example.com instead of a specific name. When this certificate is presented to a service or client using python-cryptography's PolicyBuilder/Store verifier, the verifier incorrectly accepts the chain and treats the certificate as authoritative for bar.example.com - a domain outside the sub-CA's permitted scope. The GHSA advisory includes a complete, runnable PoC demonstrating this escape using pyca's public API.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 03, 2026

Wildcard DNS SAN matching in python-cryptography's X.509 chain verifier prior to 49.0.0 allows a leaf certificate bearing *.example.com to satisfy a constrained intermediate CA's permittedSubtrees restriction of foo.example.com, enabling scope escape to sibling domains such as bar.example.com. Applications relying on the PolicyBuilder/Store verification API are exposed to acceptance of invalid certificate chains that should be rejected per RFC 5280 §4.2.1.10. A public proof-of-concept is confirmed in the GHSA advisory; the vulnerability is not in the CISA KEV catalog, but the CVSS 4.0 E:P modifier reflects the POC's availability.

RemediationAI

Upgrade to python-cryptography 49.0.0 or later via pip install 'cryptography>=49.0.0'. The fix is delivered in commit 4d035a4225965edeffd312079a510ef25fcfdcb2 (https://github.com/pyca/cryptography/commit/4d035a4225965edeffd312079a510ef25fcfdcb2) and PR #14888 (https://github.com/pyca/cryptography/pull/14888). If an immediate upgrade is not feasible, applications that require Name Constraints enforcement should switch certificate verification to OpenSSL's own engine rather than using the PolicyBuilder/Store path - this eliminates the vulnerable code path entirely, though it requires refactoring the verification call site. Alternatively, applications can add an explicit pre-verification check that rejects any leaf certificate whose DNS SANs contain wildcard entries when Name Constraints are present in the issuing chain; this is conservative and may reject some valid certificates, but eliminates the bypass. Generic network filtering provides no mitigation because the flaw is in library logic, not a network-accessible endpoint.

Affected VersionsENISA

cryptography < 49.0.0

Affected Packages

pypi cryptography fix: 49.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw resides in the Rust-backed crate cryptography-x509-verification, specifically DNSConstraint::matches in src/rust/cryptography-x509-verification/src/types.rs (CPE: cpe:2.3:a:pyca:cryptography:*:*:*:*:*:*:*:*). RFC 5280 §4.2.1.10 Name Constraints define permittedSubtrees and excludedSubtrees, each requiring distinct matching semantics for wildcard DNS SANs. A wildcard like *.example.com represents a set of single-label expansions, so a permittedSubtrees constraint of foo.example.com cannot contain all names the wildcard expands to - yet the buggy matches() function applied the same logic to both subtree kinds, incorrectly accepting the wildcard as satisfying the narrower constraint. The fix, merged in PR #14888 and commit 4d035a4225965edeffd312079a510ef25fcfdcb2, introduces a SubtreeKind enum dispatching to permits() (containment semantics for permittedSubtrees) versus excludes() (overlap semantics for excludedSubtrees). CWE-295 (Improper Certificate Validation) precisely captures the root cause: the verifier's logic diverges from the RFC's required semantics.

Know when Cryptography gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:P
vuln.today AI 6.5 MEDIUM

AV:N as the flaw is triggered by presenting crafted certificates over the network; AC:H reflects the specific prerequisite of a constrained sub-CA with permittedSubtrees; I:H for certificate trust bypass enabling domain impersonation.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 5.4 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Red Hat 7.4 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 03, 2026 - 22:17 EUVD
CVE Published
Aug 03, 2026 - 21:21 cve.org
MEDIUM 6.9

DescriptionCVE.org

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Prior to 49.0.0, if an intermediate constrained CA permits the DNS name foo.example.com, and the leaf certificate has a wildcard in its DNS SAN of *.example.com, python-cryptography's verifier accepts which allows escaping outside of the permitted names. The core issue is in DNSConstraint::matches, where a wildcard pattern was treated as matching a more-specific permitted constraint even though *.example.com can expand to sibling names such as bar.example.com outside foo.example.com. This allows acceptance of an invalid certificate chain. This issue is fixed in 49.0.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 422 pypi packages depend on cryptography (272 direct, 150 indirect)

Ecosystem-wide dependent count for version 49.0.0.

Threat Intelligence Overview

EPSS Score
0.2%
Top 92% exploitable
Prevalence
High
widely used Python cryptography library across many ecosystems and frameworks
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
4
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA MSRC Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

54
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-69249 HIGH POC
8.7 Aug 03

Certificate path building in python-cryptography before 49.0.0 is exploitable as a denial-of-service vector by attackers

CVE-2026-69247 HIGH POC
8.2 Aug 03

PKCS#7 EnvelopedData decryption in the Python cryptography library (versions 44.0.0-49.x) leaks a Bleichenbacher oracle

CVE-2023-38325 HIGH POC
7.5 Jul 14

The cryptography package before 41.0.2 for Python mishandles SSH certificates that have critical options. Rated high sev

CVE-2023-49083 HIGH POC
7.5 Nov 29

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Rated high sever

CVE-2023-23931 MEDIUM POC
6.5 Feb 07

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Rated medium sev

CVE-2026-26007 HIGH
8.2 Feb 10

Private-key information disclosure in the pyca/cryptography Python package (versions <= 46.0.4) arises because public-ke

CVE-2016-9243 HIGH
7.5 Mar 27

HKDF in cryptography before 1.5.2 returns an empty byte-string if used with a length less than algorithm.digest_size. Ra

CVE-2023-50782 HIGH
7.5 Feb 05

A flaw was found in the python-cryptography package. Rated high severity (CVSS 7.5), this vulnerability is remotely expl

CVE-2024-26130 HIGH
7.5 Feb 21

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Rated high sever

CVE-2018-10903 HIGH
7.5 Jul 30

A flaw was found in python-cryptography versions between >=1.9.0 and <2.3. Rated high severity (CVSS 7.5), this vulnerab

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Micro 5.3 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy