Vulnerability · Published Sep 5, 2024 · Assigned by mitre
CVE-2024-45158
Critical 9.8
In plain English
A critical-severity stack buffer overflow in the mbedtls package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 53% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
An issue was discovered in Mbed TLS 3.6 before 3.6.1. A stack buffer overflow in mbedtls_ecdsa_der_to_raw() and mbedtls_ecdsa_raw_to_der() can occur when the bits parameter is larger than the largest supported curve. In some configurations with PSA disabled, all values of bits are affected. (This never happens in internal library calls, but can affect applications that call these functions directly.)
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45158 |
| Alpine:v3.21 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45158 |
| Alpine:v3.22 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45158 |
| Alpine:v3.23 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45158 |
| Alpine:v3.24 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45158 |
| Alpine:v3.24 | mbedtls3 | 3.6.1-r0 | ALPINE-CVE-2024-45158 |
| Ubuntu:22.04:LTS | mbedtls | no fix listed | UBUNTU-CVE-2024-45158 |
| Ubuntu:24.04:LTS | mbedtls | no fix listed | UBUNTU-CVE-2024-45158 |
Affected products (as reported)
Weakness: CWE-121 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H