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

Source: https://junglewise.ai/threats/cve-2026-31912-libpcap-bpf-interpreter-buffer-bounds-check-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-05. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/libpcap). Vendors: [Tcpdump.Org](https://junglewise.ai/threats/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

- [https://github.com/the-tcpdump-group/libpcap/commit/d3f358d3cffbe1ecb94d5284b3e81f052a0adcb9](https://github.com/the-tcpdump-group/libpcap/commit/d3f358d3cffbe1ecb94d5284b3e81f052a0adcb9)

## Related threats

- [libpcap BPF interpreter infinite loop in ja instruction](https://junglewise.ai/threats/cve-2026-6554-libpcap-bpf-interpreter-infinite-loop-in-ja-instruction)
- [libpcap BPF interpreter abort on invalid opcode](https://junglewise.ai/threats/cve-2026-31911-libpcap-bpf-interpreter-abort-on-invalid-opcode)
- [libpcap RPCAP message validation buffer over-read](https://junglewise.ai/threats/cve-2026-18238-libpcap-rpcap-message-validation-buffer-over-read)
- [libpcap BPF interpreter scratch memory validation bypass](https://junglewise.ai/threats/cve-2026-0799-libpcap-bpf-interpreter-scratch-memory-validation-bypass)
