CVE-2026-69248 in cryptography
Summary
by MITRE • 08/04/2026
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.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 08/04/2026
The vulnerability described represents a critical flaw in the python-cryptography library's certificate validation mechanism that enables bypassing DNS name constraints through improper wildcard pattern matching. This issue affects versions prior to 49.0.0 and stems from a fundamental misunderstanding of how wildcard certificates should interact with DNS name constraints. The problem manifests when an intermediate certificate authority permits specific DNS names such as foo.example.com while the leaf certificate contains a wildcard pattern *.example.com in its Subject Alternative Name field. The cryptographic library's verifier incorrectly accepts this configuration, allowing certificates to be validated even though the wildcard pattern could legitimately expand to names outside the originally permitted constraints.
The technical root cause lies within the DNSConstraint::matches implementation where wildcard patterns are processed without proper consideration of the constraint validation rules established by certificate authorities. Specifically, when a certificate contains *.example.com and an intermediate CA has granted permission for foo.example.com, the system should reject the certificate because the wildcard could match arbitrary sibling domains such as bar.example.com or baz.example.com that were never explicitly permitted. This represents a failure in the certificate chain validation logic that violates fundamental principles of certificate security and trust model enforcement.
The operational impact of this vulnerability is significant as it allows attackers to potentially bypass DNS name constraints that are critical for maintaining secure communications between services. When systems rely on certificate-based authentication and enforce specific DNS name constraints to prevent unauthorized access, this flaw enables malicious actors to present certificates that appear valid but actually violate the intended security boundaries. The vulnerability essentially creates a path where an attacker could obtain a certificate that matches a wildcard pattern but covers domains outside the originally constrained scope, undermining the trust model established by the certificate authority.
This issue aligns with CWE-295 which addresses improper certificate validation and relates to the broader category of certificate and public key validation weaknesses. The vulnerability also connects to ATT&CK technique T1552.002 which covers credentials from password storage devices, as compromised certificates could be used to gain unauthorized access to systems that rely on proper certificate validation for authentication. Organizations using python-cryptography versions prior to 49.0.0 should urgently upgrade their implementations and revalidate all certificate chains to ensure no invalid certificates have been accepted under this flaw. The fix implemented in version 49.0.0 properly enforces DNS name constraint validation by ensuring that wildcard patterns cannot escape the scope of originally permitted constraints, thereby restoring proper certificate chain validation behavior.
The resolution addresses the core issue by implementing correct wildcard pattern matching logic that respects the hierarchical nature of DNS names and ensures that certificates containing wildcards cannot be validated if they would match names outside the explicitly permitted constraints. This fix brings the library's behavior in line with standard certificate validation practices where wildcard certificates must be strictly bound to their intended scope, preventing the expansion of trust boundaries through improperly constrained certificate chains.