Infinite loop in scapy - #VU159466

 

Infinite loop in scapy - #VU159466

Published: November 5, 2026


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

Vulnerability details

The vulnerability allows a remote peer to make Scapy's PipeEngine consume an entire processor core indefinitely by closing an established TCP connection normally. The engine thread remains alive but repeatedly reads end-of-file (EOF), reducing CPU availability for services that use the affected TCP pipes.

The vulnerability exists due to TCPConnectPipe.deliver() and TCPListenPipe.deliver() handling only nonempty recv() results without marking the source exhausted when an empty result indicates EOF. A remote attacker can close the sending side of an established connection after an application adds either TCP pipe to a running PipeEngine, triggering the loop without sending data or malformed input. The socket remains readable at EOF, and PipeEngine.run() removes a source only when exhausted() returns true after delivery; because the TCP pipes never set that state on EOF, the engine repeatedly selects and reads the same socket without making progress.

The affected delivery methods are in scapy/scapypipes.py, and the engine's source-removal logic is in scapy/pipetool.py. Exploitation requires an application using TCPConnectPipe or TCPListenPipe with PipeEngine, but no unusual configuration or privileges. A reproduction recorded 195,800 delivery calls and approximately 0.209 seconds of CPU use during a 0.2-second measurement after peer closure, whereas an open, idle connection caused no delivery calls. The CPU-consuming loop persists until the application stops the engine.


Affected software

scapy

Remediation

Install security update from vendor's website.

scapy - update to 2.8.0

External References

Related Security Bulletins