# CVE-2026-63387: Libevent: Off-by-one stack buffer overflow in dnsname_to_labels via crafted DNS server response

- Severity: High 7.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A: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.42%, higher than 37% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-20T17:53:41.863Z
- Modified: 2026-10-26T10:10:00.140Z
- Weaknesses: CWE-121, CWE-193, CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Libevent is an event notification library. Prior to 2.1.13 and 2.2.2-alpha, libevent has an off-by-one stack buffer overflow in evdns.c when dnsname_to_labels formats a name-bearing DNS record at the end of the 64 KB stack buffer allocated by evdns_server_request_format_response. The final-label check permits j plus label_len plus one to equal buf_len, after which the terminating null byte is written to buf[buf_len]. A crafted DNS server response containing PTR, CNAME, MX, NS, or SOA data can trigger the one-byte out-of-bounds write and crash or corrupt the process. This issue is fixed in versions 2.1.13 and 2.2.2-alpha.

(As written by CVE List.)

## Affected

- libevent libevent: >= 2.2.0-alpha, < 2.2.2-alpha; < 2.1.13

## References

- <https://github.com/libevent/libevent/security/advisories/GHSA-58rx-7448-jw47> (exploit)
- <https://github.com/libevent/libevent/releases/tag/release-2.1.13-stable>
- <https://github.com/libevent/libevent/releases/tag/release-2.2.2-alpha>

## Sources

- CVE List: [CVE-2026-63387](https://www.cve.org/CVERecord?id=CVE-2026-63387), CVE Terms of Use, modified 2026-08-25
- NVD: [CVE-2026-63387](https://nvd.nist.gov/vuln/detail/CVE-2026-63387), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-63387 · Whole record: https://cve.day/CVE-2026-63387.json · Rebuilt by cve.day 2026-11-25T22:59:34.679Z
