Uncaught Exception in scapy - #VU159474

 

Uncaught Exception in scapy - #VU159474

Published: November 5, 2026


Vulnerability identifier: #VU159474
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-248
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service in Scapy programs serving CoAP resources through CoAPSocket. A single seven-byte UDP request can stop the affected socket from handling any subsequent requests while leaving it open and apparently healthy. A traceback is printed, but later valid requests time out.

The vulnerability exists due to ASCII decoding of attacker-controlled URI-Path option bytes in CoAPSocketImpl._handle_rcv_request() and exception handling that fails to preserve recurring receive polling. CoAP string options use UTF-8, so both valid non-ASCII UTF-8 text and invalid bytes such as 0xff can raise UnicodeDecodeError during ASCII decoding. A remote attacker can send a crafted CoAP request containing such a URI-Path option to a reachable UDP socket opened with registered resources. The exception escapes the request handler before _recv() schedules its next invocation. TimeoutScheduler catches and prints the callback exception, but does not restore the socket's polling, leaving subsequent requests unprocessed.

The affected behavior is reached when a program imports scapy.contrib.coap_socket and opens CoAPSocket with lst_resources containing CoAPResource objects. Incoming UDP requests are parsed as CoAP and routed to resource methods using their URI-Path options. No non-default configuration is required. The failure affects resource-serving sockets; code that only parses packet bytes with CoAP(packet_bytes) is unaffected.


Affected software

scapy

Remediation

Install security update from vendor's website.

scapy - update to 2.8.0

External References

Related Security Bulletins