CVE-2026-31806 FreeRDP has a Heap Buffer Overflow in nsc_process_message() via Unchecked SURFACE_BITS_COMMAND Bitmap Dimensions
A malicious RDP server can trigger a heap buffer overflow in FreeRDP via unchecked bitmap dimensions, potentially allowing remote code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-31806?
CVE-2026-31806 is a critical memory corruption vulnerability in Freerdp Freerdp, published on 13 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.24.0, the gdi_surface_bits() function processes SURFACE_BITS_COMMAND messages sent by the RDP server. When the command is handled using NSCodec, the bmp.width and bmp.height values provided by the server are not properly validated against the actual desktop dimensions. A malicious RDP server can supply crafted bmp.width and bmp.height values that exceed the expected surface size. Because these values are used during bitmap decoding and memory operations without proper bounds checking, this can lead to a heap buffer overflow. Since the attacker can also control the associated pixel data transmitted by the server, the overflow may be exploitable to overwrite adjacent heap memory. This vulnerability is fixed in 3.24.0.
Which versions are affected by CVE-2026-31806?
It affects 1 product.
Products include Freerdp Freerdp.
How do I fix CVE-2026-31806?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-31806 being exploited?
There is no known exploitation of CVE-2026-31806 in the wild and no public exploit code.
Other vulnerabilities in Freerdp Freerdp
- CVE-2021-37594 Other in n/a
- CVE-2021-37595 Other in n/a
- CVE-2026-67305 FreeRDP Windows Client before 3.29.0 Heap Buffer Overflow via Cliprdr
- CVE-2026-66402 FreeRDP before 3.29.0 TLS Certificate Identity Validation Bypass
- CVE-2026-67289 FreeRDP before 3.29.0 HTTP Proxy Request Injection via Redirection
Sources
Also known as CLSA-2026-1774277303, DEBIAN-CVE-2026-31806, GHSA-rrqm-46rj-cmx2, MINI-chmh-mg66-4wgx, UBUNTU-CVE-2026-31806.