Input validation error in scapy - #VU159462

 

Input validation error in scapy - #VU159462

Published: November 5, 2026


Vulnerability identifier: #VU159462
CSH Severity: Low
CVSS v4: 6.3 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/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 LDAP server to terminate a Scapy client's connection after SASL signing or encryption has been negotiated, causing a denial of service on the affected socket. The stream reader stops, the socket is closed, and calls using that socket return no packet rather than waiting for an incomplete record.

The vulnerability exists due to improper validation of incomplete stream data in LDAP_SASL_Buffer.tcp_reassemble. Its plain-LDAP error heuristic performs BER decoding before interpreting the SASL record length, allowing a decoding exception to escape instead of returning None to signal that more data is needed. A remote attacker can send the four bytes 30 84 00 00 while acting as the LDAP peer after SASL signing or encryption is negotiated. The leading byte 30 selects the heuristic, and 84 indicates that four BER length bytes follow, although only two are buffered, triggering the exception.

LDAP_Client.bind switches the existing network socket to the LDAP_SASL_Buffer decoder for length-prefixed protected records, placing the bytes consumed by the stream callback under the remote peer's control. StreamSocket.recv invokes the reassembler before DefaultSession.recv reaches its guarded call, so the exception escapes that session-level handling and causes the socket to close. The failure was reproduced with the default configuration.


Affected software

scapy

Remediation

Install security update from vendor's website.

scapy - update to 2.8.0

External References

Related Security Bulletins