Every CVE Search/ Get API key

CVE-2024-39312

Botan has an Authorization Error due to Name Constraint Decoding Bug

5.3 MediumFix available

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
Low
Availability
None

Exploit likelihood

0.27%Up 0.2 points since Jul 9, 2024
90%50%10%1%

What each source reports

CVE List Score used 5.3

Botan has an Authorization Error due to Name Constraint Decoding Bug

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
CVE-2024-39312
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-295
Updated
2026-11-02
EUVDEUVD-2024-37895 5.3

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
EUVD-2024-37895
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-03
NVD 5.3

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
CVE-2024-39312
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-295
Updated
2026-11-02
OSVALPINE-CVE-2024-39312 5.3

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
ALPINE-CVE-2024-39312
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
OSVAZL-43825 5.3

CVE-2024-39312 affecting package botan2 2.14.0-2

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
AZL-43825
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
OSVAZL-44286 5.3

CVE-2024-39312 affecting package botan2 2.14.0-2

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
AZL-44286
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-05
Show 9 moreShow less
OSV 5.3

Botan has an Authorization Error due to Name Constraint Decoding Bug

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
CVE-2024-39312
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness
CWE-295
Updated
2026-11-02
OSVDEBIAN-CVE-2024-39312 5.3

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
DEBIAN-CVE-2024-39312
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
OSVOESA-2024-1923 7.5

botan2 security update

Botan is a BSD-licensed crypto library written in C++. It provides a wide variety of basic cryptographic algorithms, X.509 certificates and CRLs, PKCS #10 certificate requests, a filter/pipe message processing system, and a wide variety of other features, all written in portable C++. The API reference, tutorial, and examples may help impart the flavor of the library. This is the current stable release branch 2.x of Botan.

Security Fix(es):

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. Prior to 3.5.0 and 2.19.5, checking name constraints in X.509 certificates is quadratic in the number of names and name constraints. An attacker who presented a certificate chain which contained a very large number of names in the SubjectAlternativeName, signed by a CA certificate which contained a large number of name constraints, could cause a denial of service. The problem has been addressed in Botan 3.5.0 and a partial backport has also been applied and is included in Botan 2.19.5.(CVE-2024-34702)

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. Prior to versions 3.3.0 and 2.19.4, an attacker could present an ECDSA X.509 certificate using explicit encoding where the parameters are very large. The proof of concept used a 16Kbit prime for this purpose. When parsing, the parameter is checked to be prime, causing excessive computation. This was patched in 2.19.4 and 3.3.0 to allow the prime parameter of the elliptic curve to be at most 521 bits. No known workarounds are available. Note that support for explicit encoding of elliptic curve parameters is deprecated in Botan. (CVE-2024-34703)

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.(CVE-2024-39312)

Record
OESA-2024-1923
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVOESA-2024-1924 7.5

botan2 security update

Botan is a BSD-licensed crypto library written in C++. It provides a wide variety of basic cryptographic algorithms, X.509 certificates and CRLs, PKCS #10 certificate requests, a filter/pipe message processing system, and a wide variety of other features, all written in portable C++. The API reference, tutorial, and examples may help impart the flavor of the library. This is the current stable release branch 2.x of Botan.

Security Fix(es):

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. Prior to 3.5.0 and 2.19.5, checking name constraints in X.509 certificates is quadratic in the number of names and name constraints. An attacker who presented a certificate chain which contained a very large number of names in the SubjectAlternativeName, signed by a CA certificate which contained a large number of name constraints, could cause a denial of service. The problem has been addressed in Botan 3.5.0 and a partial backport has also been applied and is included in Botan 2.19.5.(CVE-2024-34702)

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. Prior to versions 3.3.0 and 2.19.4, an attacker could present an ECDSA X.509 certificate using explicit encoding where the parameters are very large. The proof of concept used a 16Kbit prime for this purpose. When parsing, the parameter is checked to be prime, causing excessive computation. This was patched in 2.19.4 and 3.3.0 to allow the prime parameter of the elliptic curve to be at most 521 bits. No known workarounds are available. Note that support for explicit encoding of elliptic curve parameters is deprecated in Botan. (CVE-2024-34703)

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.(CVE-2024-39312)

Record
OESA-2024-1924
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVOESA-2024-1925 7.5

botan2 security update

Botan is a BSD-licensed crypto library written in C++. It provides a wide variety of basic cryptographic algorithms, X.509 certificates and CRLs, PKCS #10 certificate requests, a filter/pipe message processing system, and a wide variety of other features, all written in portable C++. The API reference, tutorial, and examples may help impart the flavor of the library. This is the current stable release branch 2.x of Botan.

Security Fix(es):

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. Prior to 3.5.0 and 2.19.5, checking name constraints in X.509 certificates is quadratic in the number of names and name constraints. An attacker who presented a certificate chain which contained a very large number of names in the SubjectAlternativeName, signed by a CA certificate which contained a large number of name constraints, could cause a denial of service. The problem has been addressed in Botan 3.5.0 and a partial backport has also been applied and is included in Botan 2.19.5.(CVE-2024-34702)

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. Prior to versions 3.3.0 and 2.19.4, an attacker could present an ECDSA X.509 certificate using explicit encoding where the parameters are very large. The proof of concept used a 16Kbit prime for this purpose. When parsing, the parameter is checked to be prime, causing excessive computation. This was patched in 2.19.4 and 3.3.0 to allow the prime parameter of the elliptic curve to be at most 521 bits. No known workarounds are available. Note that support for explicit encoding of elliptic curve parameters is deprecated in Botan. (CVE-2024-34703)

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.(CVE-2024-39312)

Record
OESA-2024-1925
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2024-39312 5.3

Botan is a C++ cryptography library. X.509 certificates can identify elliptic curves using either an object identifier or using explicit encoding of the parameters. A bug in the parsing of name constraint extensions in X.509 certificates meant that if the extension included both permitted subtrees and excluded subtrees, only the permitted subtree would be checked. If a certificate included a name which was permitted by the permitted subtree but also excluded by excluded subtree, it would be accepted. Fixed in versions 3.5.0 and 2.19.5.

Record
UBUNTU-CVE-2024-39312
CVSS 3.1
5.3 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Updated
2026-11-02
OSVopenSUSE-SU-2024:0201-1 No score

Security update for Botan

This update for Botan fixes the following issues:

Update to 2.19.5:

  • Fix multiple Denial of service attacks due to X.509 cert processing:
  • CVE-2024-34702 - boo#1227238
  • CVE-2024-34703 - boo#1227607
  • CVE-2024-39312 - boo#1227608
  • Fix a crash in OCB
  • Fix a test failure in compression with certain versions of zlib
  • Fix some iterator debugging errors in TLS CBC decryption.
  • Avoid a miscompilation in ARIA when using XCode 14
Record
openSUSE-SU-2024:0201-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:14188-1 No score

Botan-doc-2.19.5-1.1 on GA media

These are all security issues fixed in the Botan-doc-2.19.5-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:14188-1
Updated
2026-11-02
OSVUSN-7586-1 No score

botan vulnerabilities

It was discovered that Botan could have compiler dependent operations induced under certain circumstances. An attacker could possibly use this issue to cause undefined behavior. (CVE-2024-50382, CVE-2024-50383)

Bing Shi discovered that Botan did not limit the size of certain inputs when checking primality and name constraints. An attacker could possibly use this issue to cause a denial of service. (CVE-2024-34702, CVE-2024-34703)

It was discovered that Botan did not correctly handle conflicting name constraints. An attacker could possibly use this issue to bypass authentication. (CVE-2024-39312)

Record
USN-7586-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
botan
Alpine:v3.17
3.0.0 up to 2.19.5-r0
2.19.5-r0
botan
Alpine:v3.18
3.0.0 up to 2.19.5-r0
2.19.5-r0
botan
Alpine:v3.19
3.0.0 up to 2.19.5-r0
2.19.5-r0
botan
Alpine:v3.20
3.0.0 up to 2.19.5-r0
2.19.5-r0
botan
Alpine:v3.21
3.0.0 up to 2.19.5-r0
2.19.5-r0
botan3
Alpine:v3.21
before 3.5.0-r0
3.5.0-r0
botan3
Alpine:v3.22
before 3.5.0-r0
3.5.0-r0
botan3
Alpine:v3.23
before 3.5.0-r0
3.5.0-r0
botan3
Alpine:v3.24
before 3.5.0-r0
3.5.0-r0
botan2
Azure Linux:2
through 2.14.0-2 None known
Show 15 moreShow less
Affected packages
PackageAffectedFixed
botan2
Azure Linux:3
through 2.14.0-2 None known
botan
Debian:12
before 2.19.3+dfsg-1+deb12u1, plus listed versions
2.19.3+dfsg-1
2.19.3+dfsg-1+deb12u1
botan
Debian:13
before 2.19.5+dfsg-1
2.19.5+dfsg-1
botan2
openEuler:24.03-LTS
From an advisory covering 3 CVEs
before 2.19.3-3.oe2403
2.19.3-3.oe2403
botan2
openEuler:22.03-LTS-SP3
From an advisory covering 3 CVEs
before 2.19.3-3.oe2203sp3
2.19.3-3.oe2203sp3
botan2
openEuler:22.03-LTS-SP4
From an advisory covering 3 CVEs
before 2.19.3-3.oe2203sp4
2.19.3-3.oe2203sp4
botan
Ubuntu:18.04:LTS
All versions, plus listed versions
2.4.0-32.4.0-42.4.0-5ubuntu1
None known
botan
Ubuntu:20.04:LTS
All versions, plus listed versions
2.9.0-22.9.0-2build12.12.1-22.12.1-2build1
None known
botan
Ubuntu:Pro:22.04:LTS
before 2.19.1+dfsg-2ubuntu1+esm1, plus listed versions
2.17.3+dfsg-32.19.1+dfsg-2ubuntu1
2.19.1+dfsg-2ubuntu1+esm1
botan
Ubuntu:Pro:24.04:LTS
before 2.19.3+dfsg-1ubuntu2+esm1, plus listed versions
2.19.3+dfsg-1ubuntu12.19.3+dfsg-1ubuntu2
2.19.3+dfsg-1ubuntu2+esm1
botan
Ubuntu:Pro:22.04:LTS
From an advisory covering 5 CVEs
before 2.19.1+dfsg-2ubuntu1+esm1, plus listed versions
2.17.3+dfsg-32.19.1+dfsg-2ubuntu1
2.19.1+dfsg-2ubuntu1+esm1
botan
Ubuntu:Pro:24.04:LTS
From an advisory covering 5 CVEs
before 2.19.3+dfsg-1ubuntu2+esm1, plus listed versions
2.19.3+dfsg-1ubuntu12.19.3+dfsg-1ubuntu2
2.19.3+dfsg-1ubuntu2+esm1
Botan
SUSE:Package Hub 15 SP5
From an advisory covering 3 CVEs
before 2.19.5-bp155.2.3.1
2.19.5-bp155.2.3.1
Botan
openSUSE:Leap 15.5
From an advisory covering 3 CVEs
before 2.19.5-bp155.2.3.1
2.19.5-bp155.2.3.1
Botan
openSUSE:Tumbleweed
From an advisory covering 3 CVEs
before 2.19.5-1.1
2.19.5-1.1

History

History
RecordedChangedSources
affected
factsOSV
aliases, publishedEUVD
first indexedCVE List, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-39312 is a medium vulnerability (CVSS 5.3) in Botan Project Botan, published July 8, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.27%, the 19th percentile. Fixed in botan 2.19.5-r0.

References

Show 18 moreShow less
MoveEnter Open