---
schema_version: '1.0'
id: security-20260812-7b6b3d
title: 'CVE-2026-34073: cryptography has incomplete DNS name constraint enforcement
  on peer names'
url: https://osv.dev/vulnerability/GHSA-m959-cc7f-wv43
url_hash: 7b6b3dde1d03953cdf22c78f6090f6df84391089237a841d142f273ec289d0cc
canonical_url: https://osv.dev/vulnerability/GHSA-m959-cc7f-wv43
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-34073
- GHSA-m959-cc7f-wv43
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- cryptography
- PyPI
lang: en
published_at: '2026-03-27T19:56:21Z'
fetched_at: '2026-08-12T16:00:04.338655Z'
updated_at: '2026-08-22T14:37:48Z'
status: published
content_hash: d8d5d82a261023aab55b35a968390ca096ab12fa49a69b046218a301a5104883
content_changed_at: '2026-08-22T13:15:21.193737Z'
license_note: full
summary: cryptography has incomplete DNS name constraint enforcement on peer names
summary_source: rss
summary_en: cryptography has incomplete DNS name constraint enforcement on peer names
summary_omitted_reason: null
redistribution: true
keywords_en:
- constraint
- cryptography
- CVE
- CVE-2026-34073
- DNS
- DNS洪水
- enforcement
- GHSA-m959-cc7f-wv43
- has
- Hashbrown
- hostname
- incomplete
- library vulnerability
- name
- names
- peer
- PyPI
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- software security
entities_en:
- name: CVE
  type: data
- name: DNS洪水
  type: event
- name: Hashbrown
  type: creature
- name: hostname
  type: location
- name: PyPI
  type: artifact
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
- name: Hashbrown
  type: creature
- name: DNS洪水
  type: event
- name: hostname
  type: location
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
- name: Alexa Munoz
  type: UNKNOWN
  weight: 1.0
- name: Helen Woodward Animal Center
  type: organization
  weight: 1.0
- name: Lee Asher
  type: person
  weight: 1.0
computed_at: '2026-08-22T14:37:47Z'
---

# CVE-2026-34073: cryptography has incomplete DNS name constraint enforcement on peer names

## TL;DR
cryptography has incomplete DNS name constraint enforcement on peer names

## Key Points
- cve / CVE-2026-34073 / GHSA-m959-cc7f-wv43 / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N / cryptography / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
**Advisory:** GHSA-m959-cc7f-wv43 (CVE-2026-34073)

**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

**References:**
- https://github.com/pyca/cryptography/security/advisories/GHSA-m959-cc7f-wv43
- https://nvd.nist.gov/vuln/detail/CVE-2026-34073
- https://github.com/pyca/cryptography
- https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2026-35.yaml

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-m959-cc7f-wv43_

## Source
元記事: [CVE-2026-34073: cryptography has incomplete DNS name constraint enforcement on peer names](https://osv.dev/vulnerability/GHSA-m959-cc7f-wv43) — published 2026-03-27T19:56:21Z
