Skip to content
2.1 Low

CVE-2026-48057 Botan: directoryName nameConstraint bypass via multi-AVA RDN flattening in matches_dn

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.

CVSS 4.0 detail

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

Exploitable remotely over the network, with an administrator account and without any user action; the impact on data or service is limited.

Attack vector
Network
Attack complexity
High
Attack requirements
Present
Privileges required
High
Interaction
None
Confidentiality
None
Integrity
Low
Availability
None
Confidentiality of other systems
None
Integrity of other systems
Low
Availability of other systems
None

Affected products and versions

Product Affected versions Fixed in
Botan 3.13 earliest → < 3.13.0 3.13.0
The 17 CVEs of Botan →
Track this CVE