---
id: CVE-2026-48057
title: >-
  Botan: directoryName nameConstraint bypass via multi-AVA RDN flattening in
  matches_dn
summary: >-
  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 enfor…
severity: low
cvss: 2.1
cvssVector: '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'
cvssSource: cna
cwe:
  - CWE-295
  - CWE-1023
vendor: randombit
product: botan
affected:
  - botan < 3.13.0
published: '2026-11-06'
updated: '2026-11-06'
sourceUpdated: '2026-11-06T21:24:51.002Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-48057'
references:
  - url: 'https://github.com/randombit/botan/security/advisories/GHSA-3mh2-26h4-wrqc'
    label: 'https://github.com/randombit/botan/security/advisories/GHSA-3mh2-26h4-wrqc'
  - url: 'https://github.com/randombit/botan/pull/5618'
    label: 'https://github.com/randombit/botan/pull/5618'
  - url: >-
      https://github.com/randombit/botan/commit/a22260c368373a134ff9778b9d8781edb2e1eb99
    label: >-
      https://github.com/randombit/botan/commit/a22260c368373a134ff9778b9d8781edb2e1eb99
tags:
  - cve.org
ingestedAt: '2026-11-06T22:04:56.318Z'
epss: 0.00162
epssPercentile: 0.05476
---

## Overview

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.

## Affected

- `botan < 3.13.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
