# CVE-2024-5991: Buffer overread in domain name matching

- Severity: Critical 10.0 (CVSS:4.0, scored by wolfSSL) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.56%, higher than 48% of CVEs (2026-12-01)
- Published: 2024-08-27T18:33:27.550Z
- Modified: 2026-06-17T08:17:03.577Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: wolfSSL

## 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.

(As written by CVE List.)

## Affected

- wolfSSL wolfSSL: up to 5.7.0

## Every score

- wolfSSL: CVSS:4.0 10.0 Critical `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://https://github.com/wolfSSL/wolfssl/pull/7604> (broken-link)
- <https://github.com/wolfSSL/wolfssl/pull/7604> (issue-tracking, patch)

## Sources

- CVE List: [CVE-2024-5991](https://www.cve.org/CVERecord?id=CVE-2024-5991), CVE Terms of Use, modified 2024-08-27
- NVD: [CVE-2024-5991](https://nvd.nist.gov/vuln/detail/CVE-2024-5991), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-5991 · Whole record: https://cve.day/CVE-2024-5991.json · Rebuilt by cve.day 2026-11-25T22:58:44.805Z
