CVE-2026-31806: FreeRDP has a Heap Buffer Overflow in nsc_process_message() via Unchecked SURFACE_BITS_COMMAND Bitmap Dimensions
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.
Security readout for executives and security teams
Plain-English summary
FreeRDP before 3.24.0 can be crashed or potentially compromised by a malicious RDP server sending malformed bitmap data. The risk is serious because the server controls dimensions and pixel data used in memory operations. The documented fix is FreeRDP 3.24.0 or vendor-supplied patched packages.
Executive priority
Treat as urgent for environments using FreeRDP, especially privileged remote administration workstations. The issue is critical memory corruption reachable from a malicious RDP server, with an available upstream fix. No source in the bundle confirms active exploitation.
Technical view
In NSCodec handling of SURFACE_BITS_COMMAND, gdi_surface_bits() accepts server-provided bmp.width and bmp.height without properly checking them against desktop dimensions. Those values reach bitmap decoding and memory operations, causing a heap buffer overflow in the nsc_process_message() path. The CVE cites CWE-122 and CWE-131, CVSS 4.0 score 9.3, fixed in 3.24.0.
Likely exposure
Exposure is likely where FreeRDP earlier than 3.24.0 is installed or packaged, especially clients connecting to RDP servers outside trusted control. Red Hat published multiple related advisories, so Linux fleet package status should be checked through vendor channels.
Exploitation context
The bundle does not cite active exploitation, and KEV is false. The described attacker is a malicious RDP server sending crafted SURFACE_BITS_COMMAND bitmap dimensions and associated pixel data. The sources state adjacent heap memory may be overwritten, but do not confirm public exploit availability.
Researcher notes
Focus validation on NSCodec SURFACE_BITS_COMMAND handling and whether width and height are bounded against desktop dimensions before decode and copy operations. The commit and advisory are the primary technical anchors. Do not assume exploitability beyond the documented heap overwrite potential without further evidence.
Mitigation direction
Upgrade FreeRDP to 3.24.0 or later where directly managed.
Apply vendor fixed packages from Red Hat or other distribution advisories.
Avoid connecting vulnerable FreeRDP clients to untrusted RDP servers.
Prioritize systems used for administrative or privileged remote access.
Track vendor guidance for any additional hardening or backported fixes.
Validation and detection
Inventory installed FreeRDP package and library versions across endpoints and servers.
Confirm direct builds report FreeRDP 3.24.0 or later.
Confirm distribution packages map to the relevant vendor fixed advisory.
Review remote-access tooling for bundled or statically linked FreeRDP copies.
Monitor CVE, GitHub advisory, and vendor errata for status changes.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-122: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
5Timeline events
2ADP providers
20Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.