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.

Severity (CVSS)

Base score7
SeverityHigh
VersionCVSS 3.1
VectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
Provided byCNA

Weaknesses

  • CWE-121 — CWE-121: Stack-based Buffer Overflow
  • CWE-193 — CWE-193: Off-by-one Error
  • CWE-787 — CWE-787: Out-of-bounds Write

Affected products

VendorProductVersions
libeventlibevent>= 2.2.0-alpha, < 2.2.2-alpha; < 2.1.13

References

Authoritative sources

This page is a snapshot. For the latest enrichment and updates, view the record on CVE.org or the NVD.

Generated from the official CVE List on 21 Aug 2026 07:00 UTC.