GHSA-m959-cc7f-wv43

Suggest an improvement
Source
https://github.com/advisories/GHSA-m959-cc7f-wv43
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-m959-cc7f-wv43/GHSA-m959-cc7f-wv43.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-m959-cc7f-wv43
Aliases
  • CVE-2026-34073
Published
2026-03-27T19:56:21Z
Modified
2026-03-27T20:06:00.133820Z
Severity
  • 1.7 (Low) CVSS_V4 - 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 CVSS Calculator
Summary
cryptography has incomplete DNS name constraint enforcement on peer names
Details

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

Database specific
{
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-295"
    ],
    "nvd_published_at": null,
    "github_reviewed_at": "2026-03-27T19:56:21Z",
    "severity": "LOW"
}
References

Affected packages

PyPI / cryptography

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
46.0.6

Affected versions

0.*
0.1
0.2
0.2.1
0.2.2
0.3
0.4
0.5
0.5.1
0.5.2
0.5.3
0.5.4
0.6
0.6.1
0.7
0.7.1
0.7.2
0.8
0.8.1
0.8.2
0.9
0.9.1
0.9.2
0.9.3
1.*
1.0
1.0.1
1.0.2
1.1
1.1.1
1.1.2
1.2
1.2.1
1.2.2
1.2.3
1.3
1.3.1
1.3.2
1.3.3
1.3.4
1.4
1.5
1.5.1
1.5.2
1.5.3
1.6
1.7
1.7.1
1.7.2
1.8
1.8.1
1.8.2
1.9
2.*
2.0
2.0.1
2.0.2
2.0.3
2.1
2.1.1
2.1.2
2.1.3
2.1.4
2.2
2.2.1
2.2.2
2.3
2.3.1
2.4
2.4.1
2.4.2
2.5
2.6
2.6.1
2.7
2.8
2.9
2.9.1
2.9.2
3.*
3.0
3.1
3.1.1
3.2
3.2.1
3.3
3.3.1
3.3.2
3.4
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3.4.7
3.4.8
35.*
35.0.0
36.*
36.0.0
36.0.1
36.0.2
37.*
37.0.0
37.0.1
37.0.2
37.0.3
37.0.4
38.*
38.0.0
38.0.1
38.0.2
38.0.3
38.0.4
39.*
39.0.0
39.0.1
39.0.2
40.*
40.0.0
40.0.1
40.0.2
41.*
41.0.0
41.0.1
41.0.2
41.0.3
41.0.4
41.0.5
41.0.6
41.0.7
42.*
42.0.0
42.0.1
42.0.2
42.0.3
42.0.4
42.0.5
42.0.6
42.0.7
42.0.8
43.*
43.0.0
43.0.1
43.0.3
44.*
44.0.0
44.0.1
44.0.2
44.0.3
45.*
45.0.0
45.0.1
45.0.2
45.0.3
45.0.4
45.0.5
45.0.6
45.0.7
46.*
46.0.0
46.0.1
46.0.2
46.0.3
46.0.4
46.0.5

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-m959-cc7f-wv43/GHSA-m959-cc7f-wv43.json"