CVE-2026-34073: CWE-295: Improper Certificate Validation in pyca cryptography
CVE-2026-34073 is a low-severity vulnerability in the pyca cryptography Python package prior to version 46. 0. 6. The flaw involves improper certificate validation where DNS name constraints were only checked against Subject Alternative Names (SANs) in child certificates, but not against the peer name presented during validation. This allowed a peer named bar. example. com to incorrectly validate against a wildcard certificate for *. example. com, even if an excluded subtree constraint existed higher in the certificate chain. The issue has been fixed in version 46.
AI Analysis
Technical Summary
The vulnerability CVE-2026-34073 affects the pyca cryptography package, a widely used Python library that provides cryptographic primitives and recipes. Prior to version 46.0.6, the package improperly validated DNS name constraints during certificate verification. Specifically, it only validated these constraints against the Subject Alternative Names (SANs) within child certificates, but failed to validate the "peer name" presented during each validation step. This flaw allowed a scenario where a peer named bar.example.com could be validated against a wildcard leaf certificate for *.example.com, even if the certificate chain contained an excluded subtree constraint explicitly forbidding bar.example.com. This improper validation violates the intended security model of certificate name constraints, potentially allowing an attacker to impersonate domains that should have been excluded. The vulnerability is classified under CWE-295 (Improper Certificate Validation). The CVSS v4.0 score is 1.7, reflecting low severity due to the high attack complexity, no privileges required, no user interaction, and limited impact on confidentiality and availability. The flaw affects all versions of pyca cryptography before 46.0.6 and has been patched in that release. No known exploits have been reported in the wild, and exploitation would require an attacker to present a crafted certificate chain with specific name constraints and wildcard certificates to bypass validation. This vulnerability primarily impacts applications relying on pyca cryptography for TLS or certificate validation, potentially undermining the integrity of secure communications.
Potential Impact
The primary impact of this vulnerability is on the integrity of TLS certificate validation in applications using vulnerable versions of pyca cryptography. An attacker capable of presenting a malicious certificate chain could bypass intended DNS name constraints, potentially impersonating domains that should have been excluded by the certificate policy. This could facilitate man-in-the-middle (MITM) attacks, allowing interception or manipulation of supposedly secure communications. However, the low CVSS score and high attack complexity indicate that exploitation is difficult and limited in scope. Confidentiality and availability impacts are minimal, as the vulnerability does not directly enable data disclosure or denial of service. Organizations relying on pyca cryptography for certificate validation in sensitive environments, such as web servers, API clients, or internal communication tools, could face increased risk of spoofing attacks if they do not update. The vulnerability is less likely to affect environments that do not use pyca cryptography or that use pinned certificates or additional validation layers. Overall, the threat is moderate but should be addressed promptly to maintain trust in cryptographic validation processes.
Mitigation Recommendations
The definitive mitigation is to upgrade all instances of the pyca cryptography package to version 46.0.6 or later, where the certificate validation logic has been corrected to properly enforce DNS name constraints against the peer name during validation. Organizations should audit their Python environments and dependency management systems to identify and update vulnerable versions. Additionally, developers should review their certificate validation configurations to ensure no custom validation logic bypasses standard checks. Employing certificate pinning or additional validation layers can provide defense-in-depth. Monitoring network traffic for unusual TLS certificate chains or unexpected domain names can help detect potential exploitation attempts. Finally, educating developers and security teams about the importance of timely dependency updates and secure certificate validation practices will reduce exposure to similar vulnerabilities.
Affected Countries
United States, Germany, United Kingdom, France, Japan, South Korea, Canada, Australia, Netherlands, Sweden
CVE-2026-34073: CWE-295: Improper Certificate Validation in pyca cryptography
Description
CVE-2026-34073 is a low-severity vulnerability in the pyca cryptography Python package prior to version 46. 0. 6. The flaw involves improper certificate validation where DNS name constraints were only checked against Subject Alternative Names (SANs) in child certificates, but not against the peer name presented during validation. This allowed a peer named bar. example. com to incorrectly validate against a wildcard certificate for *. example. com, even if an excluded subtree constraint existed higher in the certificate chain. The issue has been fixed in version 46.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-34073 affects the pyca cryptography package, a widely used Python library that provides cryptographic primitives and recipes. Prior to version 46.0.6, the package improperly validated DNS name constraints during certificate verification. Specifically, it only validated these constraints against the Subject Alternative Names (SANs) within child certificates, but failed to validate the "peer name" presented during each validation step. This flaw allowed a scenario where a peer named bar.example.com could be validated against a wildcard leaf certificate for *.example.com, even if the certificate chain contained an excluded subtree constraint explicitly forbidding bar.example.com. This improper validation violates the intended security model of certificate name constraints, potentially allowing an attacker to impersonate domains that should have been excluded. The vulnerability is classified under CWE-295 (Improper Certificate Validation). The CVSS v4.0 score is 1.7, reflecting low severity due to the high attack complexity, no privileges required, no user interaction, and limited impact on confidentiality and availability. The flaw affects all versions of pyca cryptography before 46.0.6 and has been patched in that release. No known exploits have been reported in the wild, and exploitation would require an attacker to present a crafted certificate chain with specific name constraints and wildcard certificates to bypass validation. This vulnerability primarily impacts applications relying on pyca cryptography for TLS or certificate validation, potentially undermining the integrity of secure communications.
Potential Impact
The primary impact of this vulnerability is on the integrity of TLS certificate validation in applications using vulnerable versions of pyca cryptography. An attacker capable of presenting a malicious certificate chain could bypass intended DNS name constraints, potentially impersonating domains that should have been excluded by the certificate policy. This could facilitate man-in-the-middle (MITM) attacks, allowing interception or manipulation of supposedly secure communications. However, the low CVSS score and high attack complexity indicate that exploitation is difficult and limited in scope. Confidentiality and availability impacts are minimal, as the vulnerability does not directly enable data disclosure or denial of service. Organizations relying on pyca cryptography for certificate validation in sensitive environments, such as web servers, API clients, or internal communication tools, could face increased risk of spoofing attacks if they do not update. The vulnerability is less likely to affect environments that do not use pyca cryptography or that use pinned certificates or additional validation layers. Overall, the threat is moderate but should be addressed promptly to maintain trust in cryptographic validation processes.
Mitigation Recommendations
The definitive mitigation is to upgrade all instances of the pyca cryptography package to version 46.0.6 or later, where the certificate validation logic has been corrected to properly enforce DNS name constraints against the peer name during validation. Organizations should audit their Python environments and dependency management systems to identify and update vulnerable versions. Additionally, developers should review their certificate validation configurations to ensure no custom validation logic bypasses standard checks. Employing certificate pinning or additional validation layers can provide defense-in-depth. Monitoring network traffic for unusual TLS certificate chains or unexpected domain names can help detect potential exploitation attempts. Finally, educating developers and security teams about the importance of timely dependency updates and secure certificate validation practices will reduce exposure to similar vulnerabilities.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-03-25T16:21:40.868Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69cbd8dce6bfc5ba1d1c31b6
Added to database: 3/31/2026, 2:23:24 PM
Last enriched: 3/31/2026, 2:40:44 PM
Last updated: 3/31/2026, 3:52:03 PM
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.