Vulnerability · Published Sep 5, 2024 · Assigned by mitre
CVE-2024-45159
Critical 9.8
In plain English
A critical-severity improper certificate validation 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.4% (higher than 33% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
An issue was discovered in Mbed TLS 3.x before 3.6.1. With TLS 1.3, when a server enables optional authentication of the client, if the client-provided certificate does not have appropriate values in if keyUsage or extKeyUsage extensions, then the return value of mbedtls_ssl_get_verify_result() would incorrectly have the MBEDTLS_X509_BADCERT_KEY_USAGE and MBEDTLS_X509_BADCERT_KEY_USAGE bits clear. As a result, an attacker that had a certificate valid for uses other than TLS client authentication would nonetheless be able to use it for TLS client authentication. Only TLS 1.3 servers were affected, and only with optional authentication (with required authentication, the handshake would be aborted with a fatal alert).
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45159 |
| Alpine:v3.21 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45159 |
| Alpine:v3.22 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45159 |
| Alpine:v3.23 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45159 |
| Alpine:v3.24 | mbedtls | 3.6.1-r0 | ALPINE-CVE-2024-45159 |
| Alpine:v3.24 | mbedtls3 | 3.6.1-r0 | ALPINE-CVE-2024-45159 |
| Ubuntu:22.04:LTS | mbedtls | no fix listed | UBUNTU-CVE-2024-45159 |
| Ubuntu:24.04:LTS | mbedtls | no fix listed | UBUNTU-CVE-2024-45159 |
Affected products (as reported)
Weakness: CWE-295 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H