CVE-2026-31806 in FreeRDPinfo

Summary

by MITRE • 03/13/2026

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.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 05/13/2026

The vulnerability identified as CVE-2026-31806 affects FreeRDP, an open-source implementation of the Remote Desktop Protocol that enables remote desktop connections across various platforms. This security flaw exists in versions prior to 3.24.0 and specifically targets the gdi_surface_bits() function within the RDP client implementation. The issue manifests when processing SURFACE_BITS_COMMAND messages that are part of the RDP protocol's surface update mechanism, which handles bitmap data transmission for remote desktop displays. The vulnerability represents a critical security concern because it can be exploited through a malicious RDP server that has established a connection to a vulnerable FreeRDP client.

The technical flaw stems from inadequate input validation within the bitmap processing pipeline of FreeRDP's graphics subsystem. When handling NSCodec compressed bitmap data, the implementation fails to verify that the bmp.width and bmp.height parameters provided by the RDP server remain within the bounds of the actual desktop surface dimensions. This validation gap allows an attacker to craft malicious SURFACE_BITS_COMMAND messages containing oversized width and height values that exceed the legitimate surface boundaries. The absence of proper bounds checking during bitmap decoding operations creates a condition where memory allocation and access patterns are based on attacker-controlled dimensions rather than validated system parameters.

The operational impact of this vulnerability is severe and potentially exploitable, as demonstrated by the heap buffer overflow condition that results from the unvalidated dimensions. When the malicious RDP server provides oversized bitmap dimensions, the FreeRDP client allocates memory buffers based on these attacker-controlled values, leading to memory corruption when the actual bitmap data is processed. The heap overflow occurs because the memory allocation does not account for the oversized dimensions, and subsequent memory operations overwrite adjacent heap regions. This memory corruption is particularly dangerous because the attacker can also control the associated pixel data transmission, potentially enabling them to craft specific payload contents that can be used to overwrite critical heap metadata or function pointers, thereby facilitating arbitrary code execution.

This vulnerability aligns with CWE-129, which describes improper validation of array index or buffer bounds, and represents a classic heap-based buffer overflow scenario. From an adversarial perspective, this issue maps to ATT&CK technique T1059.007 for command and scripting interpreter, and T1211 for exploitation for privilege escalation, as successful exploitation could lead to remote code execution with the privileges of the affected FreeRDP process. The vulnerability's exploitability is enhanced by the fact that it requires no special privileges to trigger, as it operates entirely within the context of a legitimate RDP connection where the client processes received bitmap data from the server. Organizations using FreeRDP implementations should immediately update to version 3.24.0 or later, as this release includes proper bounds validation for bitmap dimensions and addresses the heap overflow condition. Additional mitigations include network segmentation to limit RDP server access, implementing strict RDP server authentication mechanisms, and monitoring for unusual bitmap data patterns that might indicate exploitation attempts.

Responsible

GitHub M

Reservation

03/09/2026

Disclosure

03/13/2026

Moderation

accepted

CPE

ready

EPSS

0.00033

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!