1. An incomplete fix
In early 2026, libsoup fixed CVE-2026-0716, an integer overflow in WebSocket frame processing (commit 6ff7ef0, version 3.6.6). libsoup is the GNOME project’s HTTP library; many Linux applications use it, and it ships with Red Hat Enterprise Linux. Reading the fix, we noticed that the new check sat inside an if (masked) block, so it only protected masked frames.
2. Why the client path stayed open
RFC 6455 requires clients to always mask their frames and servers never to mask theirs. The fix therefore protected a libsoup server receiving data from a client. A libsoup client receiving data from a server always runs with masked = FALSE, so the check never executes. The code is process_frame(), in libsoup/websocket/soup-websocket-connection.c.
/* line 1144: length check, never protected on the client side */
if (len < at + payload_len) /* the 64-bit addition wraps */
return FALSE;
/* lines 1149-1158: the fix for CVE-2026-0716 */
if (masked) {
if (payload_len > G_MAXSIZE - 14) {
bad_data_error_and_close (self);
return FALSE;
}
...
}
3. A 10-byte frame
The malicious server sends an unmasked binary frame that announces a length of 2^64 − 10 bytes. In process_frame(), at is 10 and payload_len is 0xFFFFFFFFFFFFFFF6, and their sum, computed as an unsigned 64-bit value, wraps to 0. The check len < 0 is false and processing continues. process_contents() then truncates the length to 32 bits (0xFFFFFFF6, about 4 GB) and tries to copy 4 GB out of a 1,024-byte buffer.
\x82 \x7f \xff \xff \xff \xff \xff \xff \xff \xf6
0x82 FIN = 1, opcode = binary
0x7f MASK = 0, 64-bit length
0xFFFFFFFFFFFFFFF6 payload_len = 2^64 - 10
at + payload_len = 10 + 0xFFFFFFFFFFFFFFF6 = 0 (mod 2^64)
4. Reproducing the crash
We wrote three files: a malicious WebSocket server in Python, a minimal libsoup client in C, and a small program that reproduces the arithmetic on its own, without libsoup. Built with AddressSanitizer, the client stops on an out-of-bounds read of more than 4 GB. Without AddressSanitizer it crashes with SIGSEGV (exit code 139).
==62960==ERROR: AddressSanitizer: heap-buffer-overflow
READ of size 4294967286 at 0x619000005e80 thread T0
#0 memcpy
#1 g_array_append_vals
#2 on_web_socket_input <-- process_frame -> process_contents
0x619000005e80 is located 0 bytes after 1024-byte region
5. Who is affected, and how badly
Two conditions are needed. An application uses libsoup’s WebSocket client and connects to a server the attacker controls, and the size limit is disabled with max_incoming_payload_size = 0. That option is documented (“or 0 to not limit it”) and the Autobahn compliance test suite uses it. The default 128 KB limit blocks the attack. The impact is a client crash and a possible information leak; no data is modified. The CVSS 3.1 score is 4.8, Medium (AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:L), and Red Hat lists Red Hat Enterprise Linux 10 among the affected products.
6. The fix and a hardening note
Merge request 518 replaces the old check with a single guard that covers both the masked and unmasked paths. We verified it with AddressSanitizer: the previous build reproduces the crash, and the patched build closes the connection cleanly with code 1007 (BAD_DATA). We also tested other extreme lengths and the new regression tests. The guard still runs after the addition that wraps. That is not exploitable today, but code added later between those two lines could bring the bug back, so we recommended checking before the arithmetic.
/* recommended: check before adding */
if (payload_len > G_MAXSIZE - 14) {
bad_data_error_and_close (self);
return FALSE;
}
if (len < at + payload_len)
return FALSE;
7. Timeline
We reported the bug with Adel Bouachraoui through coordinated disclosure to GNOME’s security programme on YesWeHack. Three other reports of the same issue arrived shortly after ours.
8. Sources
Official records for further reading:
What people ask us about this CVE
Am I affected?
Only if one of your applications uses libsoup’s WebSocket client with max_incoming_payload_size = 0 and connects to servers you do not control. The default 128 KB limit blocks the attack.
Why is the score only 4.8?
The victim has to connect to a malicious server with a specific configuration, which makes the attack complexity high. The bug is an out-of-bounds read, so data integrity is not affected, and the initial score of 5.6 was lowered to 4.8 for that reason.
What if I cannot update right away?
Restore a size limit on incoming messages and restrict WebSocket connections to trusted servers until you can apply the update.