Origin validation error in scapy - #VU159469

 

Origin validation error in scapy - #VU159469

Published: November 5, 2026


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

Vulnerability details

The vulnerability allows an unauthenticated sender to substitute attacker-controlled content for a victim's TFTP upload in Scapy's TFTP_WRQ_server. The server returns the victim's requested filename paired with the attacker's bytes. The demonstrated impact is limited to content substitution in the returned data; the shipped server does not write the content to disk, and no built-in persistence or code execution impact is established.

The vulnerability exists due to missing validation that upload DATA packets originate from the IP address and UDP source port that initiated the transfer. In scapy/layers/tftp.py, master_filter checks for TFTP traffic and the configured local destination address, while receive_data checks only whether the supplied block number matches the expected block. Accepted payloads are appended and returned without another origin check. A remote attacker can send a DATA packet from a second UDP endpoint while an upload is active and win the race against the victim's expected block. Sending block 1 before the victim can replace a single-block upload; a short block immediately ends the transfer, so one datagram suffices and the attacker does not need to receive a response.

The affected automaton is an opt-in network service that an application starts by creating TFTP_WRQ_server and calling run(); ordinary Scapy packet dissection does not start it. The initial write request establishes the filename and the endpoint used for replies, but that endpoint is not enforced for incoming upload data. Consequently, the victim receives ACK block 1 even when the accepted DATA came from the attacker. The first expected block number is fixed at 1, and any subsequent use of the returned filename and bytes is application-defined.


Affected software

scapy

Remediation

Install security update from vendor's website.

scapy - update to 2.8.0

External References

Related Security Bulletins