Read the docs

Over-disclosure and abort in FreeRDP gateway WebSocket Ping handling

Priority LOW 38Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub.

Summary

FreeRDP through 3.28.0 mishandles server-sent WebSocket Ping control frames in its gateway transport. A non-empty Ping makes the client send a Pong padded to 1024 bytes, so it contains memory beyond the received Ping payload, and a zero-length Ping triggers an assertion that terminates the client. A malicious gateway or WebSocket peer can cause both conditions, and because the peer receives the masking key it can recover the over-disclosed bytes.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

Description from the GitHub advisory

## Summary FreeRDP's gateway WebSocket transport mishandles server-sent Ping control frames. A non-empty Ping causes the client to send an overlong Pong containing bytes beyond the received Ping payload. A zero-length Ping reaches an assertion and terminates the client. Reporter / credit: Bin Luo, UESTC ## Confirmed versions - Current master HEAD tested: f3b4347105114fe7453828736bea069999af319f - Supported release checked: 3.28.0 - Relevant files unchanged between 3.28.0 and current master: libfreerdp/core/gateway/websocket.c and websocket.h ## Affected code path - libfreerdp/core/gateway/websocket.c: websocket_context_read() - libfreerdp/core/gateway/websocket.c: websocket_handle_payload() - libfreerdp/core/gateway/websocket.c: websocket_read_wstream() - libfreerdp/core/gateway/websocket.c: websocket_reply_pong() - libfreerdp/core/gateway/websocket.c: websocket_context_write_wstream() ## Root cause websocket_context_new() creates responseStreamBuffer with Stream_New(nullptr, 1024). The stream length remains 1024. For a Ping frame, websocket_read_wstream() appends only the received payload bytes and advances the stream position, but does not seal the stream length to the bytes actually read. websocket_reply_pong() then passes the stream to websocket_context_write_wstream(), which uses Stream_Length(sPacket) rather than the current position. Therefore a one-byte Ping is replied to as a 1024-byte Pong. For a zero-length Ping, Stream_GetPosition(responseStreamBuffer) is zero, so websocket_reply_pong() calls websocket_reply_close(bio, context, nullptr). That reaches websocket_context_write_wstream(), which asserts sPacket. ## Reproduction evidence I reproduced this locally with a Docker/ASan harness using the FreeRDP WebSocket code. Control: one-byte binary frame: running control: one-byte websocket binary frame websocket_context_read rc=1 application_data: 42 peer-visible reply_len=-1 Bug case 1: one-byte Ping: running bug: one-byte websocket ping websocket_context_read rc=-1 peer-visible reply_len=1032 decoded_reply_opcode=0x0a payload_len=1024 masked=1 unmasked_payload_prefix: 41 be be be be ... The input Ping payload length is 1 byte (0x41). The peer-visible reply is a Pong with payload length 1024. The peer receives the WebSocket masking key and can unmask the reply payload. Bug case 2: zero-length Ping: websocket_context_write_wstream: Assertion '((sPacket))' failed ## Impact A malicious gateway/WebSocket peer can: - cause the client to send an overlong Pong containing bytes beyond the received Ping payload; - terminate the client with a valid zero-length Ping control frame. The overlong Pong is masked as required for client-to-server WebSocket frames, but the peer receives the masking key, so the peer can recover the payload. I am not claiming RCE or an attacker-controlled write primitive. ## Suggested fix - Seal or set the response stream length to the actual number of bytes read before sending a Pong. - Reply to a zero-length Ping with a zero-length Pong instead of calling the close helper with nullptr. - Enforce WebSocket control frame rules, including payload length <= 125 and no fragmentation for control frames.

Why it matters now

Fix Fixed FreeRDP (c/c++): 3.29.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—FreeRDP (c/c++)<= 3.28.03.29.0Patch availableGHSA-8v6m-2cmc-chx9
  • FreeRDP (c/c++) Vendor— Affected <= 3.28.0 Fixed in 3.29.0 Patch available GHSA-8v6m-2cmc-chx9

Remediation

Upgrade FreeRDP to version 3.29.0, which fixes the issue.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

  • Fix · GHSA-8v6m-2cmc-chx9 FreeRDP (c/c++) Fixed in 3.29.0 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-8v6m-2cmc-chx9

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences