cryptography has incomplete DNS name constraint enforcement on peer names
Summary
In versions of cryptography prior to 46.0.5, DNS name constraints were only validated against SANs within child certificates, and not the "peer name" presented during each validation. Consequently, cryptography would allow a peer named bar.example.com to validate against a wildcard leaf certificate for *.example.com, even if the leaf's parent certificate (or upwards) contained an excluded subtree constraint for bar.example.com.
This behavior resulted from a gap between RFC 5280 (which defines Name Constraint semantics) and RFC 9525 (which defines service identity semantics): put together, neither states definitively whether Name Constraints should be applied to peer names. To close this gap, cryptography now conservatively rejects any validation where the peer name would be rejected by a name constraint if it were a SAN instead.
In practice, exploitation of this bypass requires an uncommon X.509 topology, one that the Web PKI avoids because it exhibits these kinds of problems. Consequently, we consider this a medium-to-low impact severity.
See CVE-2025-61727 for a similar bypass in Go's crypto/x509.
Remediation
Users should upgrade to 46.0.6 or newer.
Attribution
Reporter: @1seal
Affected Packages
| Ecosystem | Package | Vulnerable Versions | Patched Version |
|---|---|---|---|
| pypi |
cryptography
|
< 46.0.6 |
46.0.6
|
chore(deps-dev): update sqlalchemy-exasol requirement from <3.0,>=2.4.0 to >=2.4.0,<8.0
Open 3 days agoBump the uv group across 1 directory with 8 updates
Open 4 days agobuild(deps): bump the uv group across 2 directories with 17 updates
Closed 4 days agobuild(deps): bump the uv group across 1 directory with 6 updates
Open 4 days agobuild(deps): bump the pip group across 2 directories with 8 updates
Closed 5 days agoBump the uv group across 1 directory with 7 updates
Open 5 days agobuild(deps): bump the uv group across 1 directory with 10 updates
Open 5 days agobuild(deps): bump the pip group across 2 directories with 8 updates
Closed 5 days agoBump the pip group across 1 directory with 6 updates
Open 5 days agoBuild(deps): bump the uv group across 2 directories with 5 updates
Open 5 days agochore(deps)(deps): bump the minor-and-patch group across 1 directory with 24 updates
Open 7 days agochore(deps): bump the pip group across 2 directories with 7 updates
Closed 7 days agochore(deps): bump the pip group across 2 directories with 1 update
Open 9 days agoBump the uv group across 2 directories with 16 updates
Closed 10 days agoBump the pip group across 2 directories with 8 updates
Closed 10 days agoBump the pip group across 2 directories with 8 updates
Closed 10 days agoBump the pip group across 4 directories with 7 updates
Closed 11 days agochore(deps): bump the uv group across 3 directories with 8 updates
Closed 11 days agoBump the uv group across 2 directories with 23 updates
Closed 12 days agoBump the pip group across 3 directories with 9 updates
Closed 12 days agoBump cryptography from 45.0.4 to 46.0.7
Closed 14 days agoBump the uv group across 2 directories with 24 updates
Closed 14 days agochore(deps): bump the uv group across 1 directory with 4 updates
Closed 15 days agoBump cryptography from 46.0.5 to 46.0.7
Open 15 days agochore(deps): bump cryptography from 46.0.5 to 46.0.7
Closed 16 days agoBump the uv group across 1 directory with 5 updates
Open 16 days agoBump cryptography from 44.0.2 to 46.0.7
Closed 17 days agochore(deps): bump the uv group across 4 directories with 10 updates
Open 17 days agochore(deps): bump the uv group across 4 directories with 12 updates
Closed 17 days agochore(deps): bump the uv group across 3 directories with 6 updates
Open 17 days agochore(deps): bump the uv group across 4 directories with 13 updates
Open 17 days agobuild(deps): bump cryptography from 45.0.4 to 46.0.7
Closed 17 days agochore(deps): bump the uv group across 1 directory with 3 updates
Closed 18 days agoBump cryptography from 46.0.5 to 46.0.7
Open 18 days agoBump the pip group across 1 directory with 3 updates
Open 19 days agobuild(deps): bump cryptography from 46.0.4 to 46.0.7 in /backend
Closed 19 days agochore(deps): bump cryptography from 45.0.4 to 46.0.7 in /rs/rosetta-api/examples/icrc1/python
Open 20 days agoBump cryptography from 46.0.5 to 46.0.7 in /server
Open 20 days agobuild(deps): bump the minor-updates group across 1 directory with 23 updates
Closed 21 days agoBump cryptography from 1.7.2 to 46.0.7
Open 22 days agochore(deps): bump cryptography from 45.0.4 to 46.0.7
Open 22 days agobuild(deps): bump the uv group across 1 directory with 6 updates
Open 23 days agoBump the pip group across 1 directory with 5 updates
Open 23 days agochore(deps): bump cryptography from 46.0.5 to 46.0.7
Closed 24 days agoBump the pip group across 2 directories with 3 updates
Open 24 days agochore(deps): bump the uv group across 2 directories with 5 updates
Closed 24 days agoBump the pip group across 1 directory with 5 updates
Closed 24 days agochore(deps): Bump cryptography from 43.0.3 to 46.0.7 in /apps/myrestaurantreviews/backend
Open 25 days agochore: bump the python-minor-patch group across 2 directories with 20 updates
Open 25 days agochore(deps): update cryptography requirement from <47.0.0,>=44.0.3 to >=46.0.7,<47.0.0
Closed 25 days agoActions
Advisory Details
| Published: | March 27, 2026 about 2 months ago |
| Updated: | April 26, 2026 22 days ago |
| CVSS Score: | 1.7 CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:U |
| EPSS: | 0.01% 1th percentile |
| Source: | Github |
| Classification: | GENERAL |
| UUID: | GSA_kwCzR0hTQS1tOTU5LWNjN2Ytd3Y0M84ABUZe |