# CVE-2026-18238: libpcap RPCAP message validation buffer over-read

Source: https://junglewise.ai/threats/cve-2026-18238-libpcap-rpcap-message-validation-buffer-over-read  
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-18238 · Severity: medium · CVSS 5 · Published 2026-09-05

libpcap is a widely-used packet capture library that many network tools and security applications depend on. The rpcap remote capture client code fails to properly validate message headers from a rpcap server, allowing a malicious server to trick a client into reading up to 20 bytes of memory beyond the legitimate packet buffer. This can expose sensitive data or crash the client application.

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-18238 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-18238 being exploited in the wild.

**How severe is CVE-2026-18238?** Medium severity, with a CVSS score of 5, published 5 September 2026.

**Which products and versions are affected?** tcpdump.org libpcap.

**Is there a fix for CVE-2026-18238?** 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-18238 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-18238?** Check whether you run Tcpdump.Org Libpcap. 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 vulnerability exists in the rpcap client code's handling of RPCAP_MSG_PACKET messages. The pcap_read_nocb_remote() function does not correctly validate that a complete RPCAP_MSG_PACKET header is present in the received message, and uses an incorrect length value to validate the declared message size. This allows a malicious rpcap server to send a crafted packet message that causes the client to over-read the buffer by up to 20 bytes, reading into adjacent process memory. The issue is network-reachable and requires only that the client connects to a malicious rpcap server. An integer overflow vulnerability in the UDP code path on 32-bit architectures is also mentioned. A fix is available in libpcap's repository.

## Affected products

- tcpdump.org libpcap

## Timeline

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

## References

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

## 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 buffer bounds check bypass](https://junglewise.ai/threats/cve-2026-31912-libpcap-bpf-interpreter-buffer-bounds-check-bypass)
- [libpcap BPF interpreter abort on invalid opcode](https://junglewise.ai/threats/cve-2026-31911-libpcap-bpf-interpreter-abort-on-invalid-opcode)
- [libpcap BPF interpreter scratch memory validation bypass](https://junglewise.ai/threats/cve-2026-0799-libpcap-bpf-interpreter-scratch-memory-validation-bypass)
