Input validation error in scapy - #VU159463

 

Input validation error in scapy - #VU159463

Published: November 5, 2026


Vulnerability identifier: #VU159463
CSH Severity: Low
CVSS v4: 1.8 [CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]
CVE-ID: N/A
CWE-ID: CWE-20
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to interrupt Scapy's in-memory offline packet analysis when an application passes attacker-controlled network-origin bytes to sniff(offline=...) as list elements. A nonempty bytes value at the beginning of the list causes the only reader to close before any packets are delivered, dropping all later items, including valid packets. Scapy logs a warning, but the caller receives a normal empty PacketList rather than an exception and must recreate its source.

The vulnerability exists due to improper handling of serialized bytes in IterSocket.recv, which reconstructs each item using pkt.__class__(bytes(pkt), **kwargs). For a bytes element, this returns another bytes object instead of a Scapy packet. A remote attacker can supply network-origin bytes that trigger this failure if an application collects those bytes and passes them in an explicit offline list. The socket and session return successfully, but AsyncSniffer._run subsequently attempts to assign p.sniffed_on, raising AttributeError. The surrounding socket-error handler closes and removes the reader, preventing processing of the remaining list elements.

Scapy supports in-memory Packet, PacketList, and Python list inputs through IterSocket, including an explicit branch for lists of serialized bytes. Any nonempty bytes element can reach the affected branch; malformed packet contents, special sessions, privileges, and configuration changes are not required. Equivalent inputs supplied as actual packet objects are processed normally. The failure occurs after successful socket and session processing, rather than within the session itself.


Affected software

scapy

Remediation

Install security update from vendor's website.

scapy - update to 2.8.0

External References

Related Security Bulletins