CVE Wiki Pixee · CVE intelligence
← All CVEs

CVE-2026-31806

Critical · CVSS 9.8

FreeRDP — Heap buffer overflow via unvalidated bitmap dimensions in NSCodec surface bits processing

CVSS
9.8
nvd
EPSS
KEV
No
Class
oss containerizable
CWE-122, CWE-131

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.

Search profile — drives PoC discovery

Symbols gdi_surface_bitsSURFACE_BITS_COMMANDNSCodecbmp.widthbmp.heightgdi_surface_bits_exnsc_process_messagefreerdp_client_codecs_prepare
Keywords CVE-2026-31806FreeRDPgdi_surface_bitsSURFACE_BITS_COMMANDNSCodecheap buffer overflowbmp.width bmp.heightGHSA-rrqm-46rj-cmx2FreeRDP 3.24.0RDP server malicious bitmapCWE-122
Versions: < 3.24.0

Ranked PoCs (1) — best first

Heuristic ranking — not yet expert-vetted. Scored on structure + provenance, not execution.

Recall-favoring discovery; ranking by the Stage-4 scorer (Adam's rubric). Scanner/aggregator repos are hidden.

References

Status: enriched · ingested 2026-06-30T06:00:22.000Z · profiled 2026-07-01T06:30:14.000Z