Botan is a C++ cryptography library. In 3.11.0, the function Certificate_Store::certificate_known had a misleading name; it would return true if any certificate in the store had a DN (and subject key identifier, if set) matching that of the argument. It did not check that the cert it found and the cert it was passed were actually the same certificate. In 3.11.0 an extension of path validation logic was made which assumed that certificate_known only returned true if the certificates were in fact identical. The impact is that if an end entity certificate is presented, and its DN (and subject key identifier, if set) match that of any trusted root, the end entity certificate is accepted immediately as if it itself were a trusted root. , This vulnerability is fixed in 3.11.1.
The Certificate_Store::certificate_known function returned true if a certificate in the store had a matching DN name (and optionally subject key identifier) with the certificate passed as an argument — without checking whether both certificates are actually identical. The extended path validation logic introduced in version 3.11.0 incorrectly assumed that this function confirms certificate identity rather than merely metadata similarity. As a result, an attacker can present any end-entity certificate whose DN (and possibly subject key identifier) matches that of any trusted root CA, and the system will immediately accept it as a trusted root.
An attacker can bypass TLS or PKI trust chain verification and impersonate a trusted certificate authority, enabling man-in-the-middle attacks or authentication without possessing the proper certificate.
The Botan library should be updated to version 3.11.1, where the vulnerability has been fixed.
Botan Project Botan version 3.11.0
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XBotan Project Botan
APPBotan Project3.11.0
Related vulnerabilities
Fałszowanie odpowiedzi OCSP w bibliotece Botan — błąd weryfikacji certyfikatów
Botan: brak obliczeń constant-time w operacjach kodowania/dekodowania
Nieprawidłowa walidacja wildcard certyfikatów w Botan 2.2.0–2.4.0
Niezdefiniowane zachowanie w Curve25519 biblioteki Botan na platformach 32-bitowych
Nieprawidłowa walidacja wildcard w certyfikatach X.509 w Botan