CVE-2026-34073: pyca cryptography incomplete DNS name constraint enforcement

CVE-2026-34073 · Severity: medium · CVSS 5.3 · Published 2026-03-31

The 'cryptography' library, a widely used Python package for secure communication, failed to properly enforce certain security restrictions on domain names during certificate validation. This could allow a malicious actor to use a certificate for a domain that should have been restricted by its parent certificate authority. While this could lead to unauthorized identity validation, it requires a specific and uncommon certificate setup to exploit.

Technologies: cryptography (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-34073 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-34073 being exploited in the wild.
How severe is CVE-2026-34073?
Medium severity, with a CVSS score of 5.3, published 31 March 2026.
Which products and versions are affected?
cryptography (PyPI) < 46.0.6, ECOSYSTEM:introduced=0,fixed=46.0.6.
Is there a fix for CVE-2026-34073?
Yes. cryptography (PyPI): upgrade to 46.0.6 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-34073 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-34073?
Check whether you run Cryptography.Io Cryptography or cryptography (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • cryptography (PyPI): upgrade to 46.0.6 or later
    pip install "cryptography>=46.0.6"

Technical details

In versions of pyca/cryptography prior to 46.0.6, DNS name constraints (RFC 5280) were only validated against Subject Alternative Names (SANs) within child certificates and not against the 'peer name' presented during validation. This logic gap allowed a peer name (e.g., bar.example.com) to successfully validate against a wildcard leaf certificate (e.g., *.example.com) even if a parent certificate explicitly excluded that specific subdomain via name constraints. The vulnerability stems from an implementation gap between RFC 5280 and RFC 9525. Attackers can bypass intended name restrictions in specific X.509 topologies. The issue is addressed in version 46.0.6 by applying name constraints to peer names as if they were SANs.

Affected products

  • pyca cryptography < 46.0.6

Identifiers

  • CVE-2026-34073
  • GHSA-m959-cc7f-wv43
  • PYSEC-2026-35

Timeline

  • 2026-03-25: disclosed
  • 2026-03-27: advisory: GitHub Advisory published
  • 2026-03-25: patched: Version 46.0.6 released

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.