---
id: "CVE-2026-121964"
kind: "vulnerability"
aliases: ["CVE-2026-121964"]
title: "FreeRDP: malicious RD Gateway can overflow client heap memory"
severity: "high"
cvss: 8.7
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["freerdp", "package", "rd-gateway", "remote-desktop"]
not_affected_if: ["fixed-version", "no-rd-gateway"]
published_at: "2026-11-04T16:17:49+00:00"
first_seen_at: "2026-11-04T16:28:15+00:00"
updated_at: "2026-11-04T16:28:37+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-121964", "first_seen_at": "2026-11-04T16:28:15+00:00"}]
---

# FreeRDP: malicious RD Gateway can overflow client heap memory

FreeRDP's RD Gateway RPC client copies BIND_ACK and ALTER_CONTEXT_RESP fragments without checking remaining buffer space, so crafted fragments with manipulated size values overwrite heap memory. An attacker controlling or compromising a RD Gateway can crash the client or potentially run code on it.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed FreeRDP version with `xfreerdp --version` or the package manager, and compare against the fixed release.
- Look for whether connections go through an RD Gateway (gateway settings in the client configuration or `/g:` option).

## Fix

- FreeRDP: move to `3.32.2` or later (the sources say 'before 3.32.2' is affected).

## Timeline

- 2026-11-04T16:28:15+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-121964

## Documents

- [advisory] Vendor advisory: github.com https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-q82v-5wjg-6h57
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/freerdp-before-3.32.2-heap-buffer-overflow-via-rpc-client-recv-fragment

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
