CVE-2026-31912: libpcap BPF interpreter buffer bounds check bypass

CVE-2026-31912 · Severity: medium · CVSS 5.5 · Published 2026-09-05

libpcap is a widely-used network packet capture library that processes packet filtering rules. A flaw in the BPF (Berkeley Packet Filter) interpreter allows crafted filter programs to read arbitrary memory outside the filter buffer, potentially exposing sensitive OS process data. An attacker supplying a malicious filter program could crash the application or leak sensitive information.

Technologies: Tcpdump.Org Libpcap. Vendors: Tcpdump.Org.

Quick answers

Is CVE-2026-31912 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-31912 being exploited in the wild.
How severe is CVE-2026-31912?
Medium severity, with a CVSS score of 5.5, published 5 September 2026.
Which products and versions are affected?
Tcpdump.Org Libpcap <unknown.
Is there a fix for CVE-2026-31912?
A patch was published on 2026-09-05. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-31912 attacked?
It is attacked with local access.
Am I affected by CVE-2026-31912?
Check whether you run Tcpdump.Org Libpcap at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The BPF interpreter in libpcap's pcapint_filter_with_aux_data() function does not validate that jump instructions remain within the filter program buffer or that execution reaches a return instruction. When a malformed filter program from an external source (via pcap_offline_filter() or bpf_filter()) causes the program counter to advance beyond the buffer bounds, the interpreter attempts to execute and read arbitrary memory, potentially covering 32 GiB on 64-bit systems or the entire address space on 32-bit systems. This can result in SIGSEGV or abort(). The fix adds a parameter specifying the number of instructions and performs bounds checking before executing instructions.

Affected products

  • tcpdump.org libpcap <unknown

Timeline

  • 2026-09-05: disclosed
  • 2026-09-05: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.