Vulnerability · Published Aug 27, 2024 · Assigned by wolfSSL
CVE-2024-5991Buffer overread in domain name matching
Critical 10.0
In plain English
A critical-severity out-of-bounds read in wolfSSL from wolfSSL. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 47% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In function MatchDomainName(), input param str is treated as a NULL terminated string despite being user provided and unchecked. Specifically, the function X509_check_host() takes in a pointer and length to check against, with no requirements that it be NULL terminated. If a caller was attempting to do a name check on a non-NULL terminated buffer, the code would read beyond the bounds of the input array until it found a NULL terminator.This issue affects wolfSSL: through 5.7.0.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | wolfssl | 5.7.2-r0 | ALPINE-CVE-2024-5991 |
| Alpine:v3.21 | wolfssl | 5.7.2-r0 | ALPINE-CVE-2024-5991 |
| Alpine:v3.22 | wolfssl | 5.7.2-r0 | ALPINE-CVE-2024-5991 |
| Alpine:v3.23 | wolfssl | 5.7.2-r0 | ALPINE-CVE-2024-5991 |
| Alpine:v3.24 | wolfssl | 5.7.2-r0 | ALPINE-CVE-2024-5991 |
| Debian:12 | wolfssl | no fix listed | DEBIAN-CVE-2024-5991 |
| Debian:13 | wolfssl | 5.7.2-0.1 | DEBIAN-CVE-2024-5991 |
| Ubuntu:22.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2024-5991 |
| Ubuntu:24.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2024-5991 |
| Ubuntu:25.10 | wolfssl | no fix listed | UBUNTU-CVE-2024-5991 |
| Ubuntu:26.04:LTS | wolfssl | no fix listed | UBUNTU-CVE-2024-5991 |
| Ubuntu:26.10 | wolfssl | no fix listed | UBUNTU-CVE-2024-5991 |
Affected products (as reported)
Weakness: CWE-125 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H