CVE-2026-69248

python-cryptography verifier accepts wildcard DNS names allowing escape from permittedSubtrees

Published Aug 3, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. In versions 45.0.0 through 48.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.

Analysis

AI-generated

Technical impact

The vulnerability is in the DNSConstraint::matches method of python-cryptography. For library versions 45.0.0 through 48.0.0, the verifier incorrectly treats a wildcard DNS subject alternative name, such as *.example.com, as matching a more specific permitted DNS name allowed by an intermediate CA (like foo.example.com). Because the wildcard can resolve to sibling names such as bar.example.com, the library accepts a certificate chain that should be rejected, allowing a domain constraint bypass. This flaw permits invalid certificates and can lead to man‑in‑the‑middle or impersonation attacks. The weakness is a CWE‑295 error in authorization logic.

Affected Systems

The python-cryptography package developed by the PyCA project is affected for all releases prior to version 49.0.0. Any application or service that imports this library for TLS/SSL certificate verification and is running an older version is vulnerable.

Risk and Exploitability

The CVSS score of 6.9 indicates a medium severity vulnerability, and the EPSS score indicates a very low exploitation probability (<1%), the flaw is not listed in the CISA KEV catalog. Exploitation is likely to occur in environments where python-cryptography performs hostname verification for TLS connections; an attacker who can supply a crafted certificate chain to a vulnerable application can cause the library to accept a chain that should be rejected, leading to unauthorized access or data compromise. The attack vector is inferred to be remote through application traffic that establishes TLS sessions using this library.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the python-cryptography library to version 49.0.0 or newer.
  • Ensure your application still performs hostname verification and does not suppress errors from the cryptography verifier; add explicit checks if your TLS stack permits flexible matching.
  • Configure or modify your application's TLS settings to enforce strict name constraint enforcement, preventing wildcard domain names from matching sibling domains outside the allowed subtree.

Generated by OpenCVE AI on September 2, 2026 at 15:17 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-m2h6-j472-rp4c python-cryptography verifier accepts wildcard DNS names allowing escape from permittedSubtrees
Ubuntu USN Ubuntu USN USN-8776-1 python-cryptography vulnerabilities
History
Type Values Removed Values Added
Description 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. cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. In versions 45.0.0 through 48.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.
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Pyca
Pyca cryptography
Vendors & Products Pyca
Pyca cryptography
Type Values Removed Values Added
Description 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.
Title python-cryptography verifier accepts wildcard DNS names allowing escape from permittedSubtrees
Weaknesses CWE-295
References
Metrics cvssV4_0

{'score': 6.9, 'vector': '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'}

Weaknesses
  • CWE-295

    Improper Certificate Validation

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 2, 2026, 1:26 PM
Reserved
Aug 3, 2026, 7:54 PM
Status
Awaiting Analysis
Published
Aug 3, 2026, 10:16 PM
Modified
Oct 23, 2026, 9:10 PM