Improper validation of integrity check value in scapy - #VU159467

 

Improper validation of integrity check value in scapy - #VU159467

Published: November 5, 2026


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

Vulnerability details

The vulnerability allows an on-path attacker to cause Scapy live TLS endpoints to accept attacker-modified, unauthenticated plaintext as application data despite failed record integrity checks. Application logic behind either TLSClientAutomaton or TLSServerAutomaton can process these changes as if they came from the legitimate peer within an established TLS connection. This affects both client-to-server and server-to-client traffic.

The vulnerability exists due to the reuse of permissive offline TLS record dissection behavior by live endpoints without enforcing record integrity. A remote attacker can modify encrypted records while positioned on the network path of an established connection after a program opts into a Scapy TLS automaton and completes a normal handshake. For TLS 1.2 and TLS 1.3 AES-GCM, decryption produces plaintext before tag verification fails; AEADTagError carries that plaintext, and the record parser catches the exception and returns its arguments instead of rejecting the record. For TLS 1.2 CBC and RC4, the parser detects an HMAC mismatch but only logs it and continues processing the decrypted fragment. The automaton then buffers the parsed messages and delivers application data without rejecting the integrity failure.

The record dissectors deliberately preserve decrypted bytes after integrity failures to support offline inspection of damaged captures. The live endpoint method _TLSAutomaton.get_next_msg() uses these same parsers and appends their messages to buffer_in. With AES-GCM and RC4, flipping a ciphertext bit flips the corresponding plaintext bit; with TLS 1.2 CBC, modifying the explicit initialization vector controls corresponding bits in the first plaintext block. The behavior was reproduced for TLS 1.2 AES-GCM, CBC, and RC4, and TLS 1.3 AES-GCM. ChaCha20-Poly1305 and AES-CCM do not expose controlled plaintext through this path. Integrity failures are logged at INFO level, which the default logger level hides, so application data can be processed without a visible integrity-failure warning.


Affected software

scapy

Remediation

Install security update from vendor's website.

scapy - update to 2.8.0

External References

Related Security Bulletins