Description
Botan is a C++ cryptography library. Prior to 3.13.0, Botan's X.509 Distinguished Name decoder flattens the Attribute-Value Assertions in each Relative Distinguished Name and loses multi-value RDN grouping before DN name-constraint enforcement. An attacker controlling a name-constrained intermediate CA can issue a certificate with a multi-value RDN whose first Common Name matches the permitted constraint and whose second Common Name is attacker-chosen, causing the constraint check to accept the flattened first value. If the certificate contains no subjectAlternativeName extension, the second Common Name can then be accepted as a hostname; Botan does not fall back to Common Name hostname matching when any subjectAlternativeName is present. The exposure is limited to deployments using DN name constraints, which are uncommon outside internal PKIs, and to certificates without a subjectAlternativeName. This issue is fixed in version 3.13.0.
Published: 2026-11-06
Score: 2.1 Low
EPSS: n/a
KEV: No
Impact: Name Constraint Bypass
Action: Apply Patch
AI Analysis

Impact

Botan's X.509 Distinguished Name decoder incorrectly flattens multi-AVA Relative Distinguished Names, causing the first Common Name value to be used for name‑constraint checks while the second value, which an attacker can choose, is ignored during enforcement. This allows a malicious intermediate CA to issue a certificate that satisfies a name‑constraint policy on the surface while introducing an additional hostname that is not covered by the constraint. The attacker can then use the certificate for the unintended hostname if the certificate lacks a subjectAlternativeName extension. The weakness is a failure to preserve multi‑value RDN grouping before name‑constraint evaluation, which is related to CWE‑1023 and CWE‑295.

Affected Systems

The vulnerability affects the randombit Botan library versions prior to 3.13.0. The affected product is botan, a C++ cryptography library used in various applications that rely on X.509 processing and DN name‑constraint enforcement.

Risk and Exploitability

The CVSS score is 2.1, indicating low severity. EPSS is not available and the vulnerability is not listed in CISA's KEV catalog. Exploitation requires control over a name‑constrained intermediate CA and the ability to issue a certificate that lacks a subjectAlternativeName. Because name‑constraint enforcement is uncommon outside internal PKIs, the risk to most deployments is limited. An attacker could still compromise entity authentication if the system accepts the flawed certificate for hostname verification.

Generated by OpenCVE AI on November 6, 2026 at 22:22 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade botan to version 3.13.0 or later, which includes the fix for the DN parser bug.
  • If upgrading is not immediately possible, configure the application to require SAN extensions in all certificates or disable name‑constraint checks for internal certificates.
  • Validate certificates with a trusted X.509 library that correctly handles multi‑value RDNs, or deploy a secondary verification step that rejects certificates whose SAN does not match the intended hostname.

Generated by OpenCVE AI on November 6, 2026 at 22:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 06 Nov 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Randombit
Randombit botan
Vendors & Products Randombit
Randombit botan

Fri, 06 Nov 2026 21:30:00 +0000

Type Values Removed Values Added
Description Botan is a C++ cryptography library. Prior to 3.13.0, Botan's X.509 Distinguished Name decoder flattens the Attribute-Value Assertions in each Relative Distinguished Name and loses multi-value RDN grouping before DN name-constraint enforcement. An attacker controlling a name-constrained intermediate CA can issue a certificate with a multi-value RDN whose first Common Name matches the permitted constraint and whose second Common Name is attacker-chosen, causing the constraint check to accept the flattened first value. If the certificate contains no subjectAlternativeName extension, the second Common Name can then be accepted as a hostname; Botan does not fall back to Common Name hostname matching when any subjectAlternativeName is present. The exposure is limited to deployments using DN name constraints, which are uncommon outside internal PKIs, and to certificates without a subjectAlternativeName. This issue is fixed in version 3.13.0.
Title Botan: directoryName nameConstraint bypass via multi-AVA RDN flattening in matches_dn
Weaknesses CWE-1023
CWE-295
References
Metrics cvssV4_0

{'score': 2.1, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-11-06T21:24:51.002Z

Reserved: 2026-05-20T18:25:25.707Z

Link: CVE-2026-48057

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-11-06T22:17:53.833

Modified: 2026-11-06T22:17:53.833

Link: CVE-2026-48057

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-06T22:45:11Z

Weaknesses
  • CWE-1023

    Incomplete Comparison with Missing Factors

  • CWE-295

    Improper Certificate Validation