CVE-2026-121964: FreeRDP before 3.32.2 contains a heap-based buffer overflow in the RD Gateway RPC client, where rpc_client_recv_fragment writes BIND_ACK and ALTER_CONTEXT_RESP
FreeRDP up to and including 3.32.1 has a heap buffer overflow in its RD Gateway RPC client. A malicious or compromised RD Gateway can overwrite client heap memory with data it controls, which can crash the client and may give code execution. Only clients that connect through an RD Gateway are exposed. Upgrade to 3.32.2.
Published Nov 4, 2026 · Analysis Nov 4, 2026
What an attacker can do
rpc_client_recv_fragment writes BIND_ACK and ALTER_CONTEXT_RESP fragments into a persistent PDU stream. Its capacity check uses Stream_EnsureCapacity, which only guarantees that total capacity is at least the length. It ignores the current write position. A later write at a non-zero position can pass the 4096-byte buffer. The gateway controls the length through alloc_hint and frag_length, and controls the content. The advisory's example overruns the buffer by about 3904 bytes.
The attacker must be the gateway, or have compromised it. It has to complete TLS and NLA security binding like a legitimate gateway, then send crafted RPC fragments. The vulnerable code runs when the HTTP and WebSocket paths fail and the client falls back to the TSG/RPC path. The proof of concept ran with /cert:ignore, but the advisory does not say that is required.
The advisory calls the overflow a starting point for a stable crash or code execution and does not confirm execution. Teams that send users through a shared RD Gateway should treat a gateway compromise as a way to reach every client behind it.
Who is affected
FreeRDP (C) up to and including 3.32.1, for clients that connect through an RD Gateway. Check the version:
xfreerdp --versionThen look for /g: gateway options in your connection profiles or launch scripts.
How to fix it
Upgrade to FreeRDP 3.32.2. The advisory lists no workaround. Avoiding RD Gateways you do not trust is a general precaution, not vendor guidance. The suggested code fix adds a check that accounts for the stream position before the write, or resets the persistent stream.
How to tell if you were hit
Look for FreeRDP client crashes during the gateway connection phase, before a desktop appears, with rpc_client_recv_fragment in a stack trace or heap corruption messages from the allocator. Check the gateway logs for changes or compromise, and check whether failed HTTP and WebSocket connections preceded the crash, since the fallback to the RPC path is what exposes the code.
Original advisory
From the National Vulnerability Database. This product uses the NVD API but is not endorsed or certified by the NVD.
FreeRDP before 3.32.2 contains a heap-based buffer overflow in the RD Gateway RPC client, where rpc_client_recv_fragment writes BIND_ACK and ALTER_CONTEXT_RESP fragments into a persistent PDU stream after checking only total capacity rather than remaining capacity from the current stream position. A malicious or compromised RD Gateway can send crafted RPC fragments with manipulated alloc_hint and frag_length values to overwrite client heap memory with attacker-controlled data, causing a crash or potentially arbitrary code execution.
Questions
- Do I need an RD Gateway to be affected by CVE-2026-121964?
Yes. The code is in the RD Gateway RPC client. It runs when the HTTP and WebSocket paths fail and the client falls back to the TSG/RPC path.
- Who is the attacker?
A malicious or compromised RD Gateway that completes TLS and NLA binding and then sends crafted RPC fragments.
- Does it give code execution?
The advisory calls it a starting point for a stable crash or arbitrary code execution. It does not confirm code execution.
- Which version fixes it?
FreeRDP 3.32.2. Versions up to and including 3.32.1 are affected.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
