CVE-2024-34703
High · 7.5CVSS
7.5
EPSS
0.5%
Published
Jun 30, 2024
CISA due date
—
Cloudanix analysis
A widely used cryptography library can be overwhelmed by certain certificates, potentially disrupting any service that uses it to verify secure connections.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
An attacker-supplied X.509 certificate using explicit EC parameter encoding with an oversized prime (e.g., 16 Kbit) triggers an expensive primality test during parsing, resulting in high CPU consumption and denial of service.
Why it matters to the business
Applications and services that rely on Botan for certificate validation may experience resource exhaustion and outages when processing malicious certificates, affecting availability of cryptographic operations across dependent systems.
How an attack unfolds
An attacker crafts an ECDSA X.509 certificate that encodes elliptic-curve parameters explicitly with a very large prime, then presents the certificate to any Botan-based TLS handshake, certificate store, or validation routine; the library performs a primality check on the oversized parameter and exhausts CPU resources.
How to fix it
Upgrade randombit/botan to version 3.3.0, 2.19.4, or the commit 9074b04c1303a24e2084f8325fa570a5ad4f2478; rebuild and redeploy all dependent applications; disable support for explicit EC parameter encoding where possible.
How to confirm the fix worked
Verify the installed Botan version is at least 3.3.0 or 2.19.4; test that a certificate with an explicit 1024-bit or larger prime parameter is rejected within a short, bounded time; review build logs for the presence of the referenced commit.
Typical attack path
- Craft a malicious X.509 certificate containing explicit EC parameters with a prime larger than 521 bits
- Deliver the certificate to a vulnerable Botan implementation during TLS negotiation or certificate validation
- Trigger the primality test on the oversized parameter
- Consume excessive CPU until the process is terminated or the system becomes unresponsive
How to detect it
Monitor process CPU utilization and duration of certificate-parsing operations; inspect application logs for unusually large or malformed certificate structures; correlate spikes with incoming TLS or certificate-validation traffic.
What your security team should do
- Immediately update all instances of Botan to 3.3.0 or 2.19.4
- Inventory and rebuild software that statically or dynamically links against Botan
- Add runtime monitoring for sustained high CPU during certificate parsing
- Consider removing explicit EC parameter support from accepted certificate profiles
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Alpine:v3.17 | botan | 0 | 2.19.5-r0 |
| Alpine:v3.18 | botan | 0 | 2.19.5-r0 |
| Alpine:v3.19 | botan | 0 | 2.19.5-r0 |
| Alpine:v3.20 | botan | 0 | 2.19.4-r0 |
| Alpine:v3.21 | botan | 0 | 2.19.4-r0 |
| Debian:11 | botan | 0 | No fix |
| Debian:12 | botan | 0 | No fix |
| Debian:13 | botan | 0 | 2.19.4+dfsg-1 |
| Debian:14 | botan | 0 | 2.19.4+dfsg-1 |
| Mageia:9 | botan2 | 0 | 2.19.5-1.mga9 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP5 | MozillaThunderbird | 0 | 115.12.2-150200.8.168.1 |
| SUSE:Linux Enterprise Module for Package Hub 15 SP6 | MozillaThunderbird | 0 | 115.12.2-150200.8.168.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP5 | MozillaThunderbird | 0 | 115.12.2-150200.8.168.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | MozillaThunderbird | 0 | 115.12.2-150200.8.168.1 |
| SUSE:Package Hub 15 SP5 | Botan | 0 | 2.19.5-bp155.2.3.1 |
| Ubuntu:20.04:LTS | botan | 0 | No fix |
| Ubuntu:22.04:LTS | botan | 0 | No fix |
| Ubuntu:24.04:LTS | botan | 0 | No fix |
| Ubuntu:24.10 | botan | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | botan | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | botan | 0 | No fix |
| Ubuntu:Pro:22.04:LTS | botan | 0 | 2.19.1+dfsg-2ubuntu1+esm1 |
| Ubuntu:Pro:24.04:LTS | botan | 0 | 2.19.3+dfsg-1ubuntu2+esm1 |
| openSUSE:Leap 15.5 | Botan | 0 | 2.19.5-bp155.2.3.1 |
| openSUSE:Leap 15.5 | MozillaThunderbird | 0 | 115.12.2-150200.8.168.1 |
| openSUSE:Leap 15.6 | MozillaThunderbird | 0 | 115.12.2-150200.8.168.1 |
| openSUSE:Tumbleweed | Botan | 0 | 2.19.5-1.1 |
| openSUSE:Tumbleweed | MozillaThunderbird | 0 | 115.12.2-1.1 |
Related vulnerabilities
- CVE-2024-34702 Botan is a C++ cryptography library. Also affects botan
- CVE-2024-39312 Botan is a C++ cryptography library. Also affects botan
- CVE-2024-50382 Botan before 3.6.0, when certain LLVM versions are used, has compiler-induced… Also affects botan
- CVE-2024-50383 Botan before 3.6.0, when certain GCC versions are used, has a compiler-induced… Also affects botan
- CVE-2024-11696 The application failed to account for exceptions thrown by the `loadManifestFromFile`… Also affects MozillaThunderbird
- CVE-2024-11697 When handling keypress events, an attacker may have been able to trick a user into… Also affects MozillaThunderbird
- CVE-2024-11695 A crafted URL containing Arabic script and whitespace characters could have hidden the… Also affects MozillaThunderbird
- CVE-2024-11699 Memory safety bugs present in Firefox 132, Firefox ESR 128.4, and Thunderbird 128.4. Also affects MozillaThunderbird