CVE-2026-31806
JSON

9.3critical

FreeRDP has a Heap Buffer Overflow in nsc_process_message() via Unchecked SURFACE_BITS_COMMAND Bitmap Dimensions

Severity
9.3critical CVSS:4.0 by GitHub_M
Exploit likelihood
0.75% (higher than 56% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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.

Affected

Product or packageVersionsReported by
FreeRDP FreeRDP< 3.24.0, before 3.24.0CVE List, NVD
freerdpNot specified
Not affected: from 2:3.10.3-12.el10_2.2 before *, from 2:3.10.3-5.el10_1.5 before *, from 2:3.10.3-3.el10_0.5 before *, from 0:2.1.1-5.el7_9.7 before *, from 2:2.11.7-6.el8_10 before *, from 2:2.0.0-46.rc4.el8_2.10 before *
CVE List

All scores

GitHub_M9.3critical CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
redhat-SADP8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-122CWE-131

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

NVD (es)

FreeRDP es una implementación gratuita del Protocolo de Escritorio Remoto. Antes de la versión 3.24.0, la función gdi_surface_bits() procesa los mensajes SURFACE_BITS_COMMAND enviados por el servidor RDP. Cuando el comando se maneja usando NSCodec, los valores bmp.width y bmp.height proporcionados por el servidor no se validan correctamente contra las dimensiones reales del escritorio. Un servidor RDP malicioso puede proporcionar valores bmp.width y bmp.height manipulados que exceden el tamaño de superficie esperado. Debido a que estos valores se utilizan durante la decodificación de mapas de bits y las operaciones de memoria sin una verificación de límites adecuada, esto puede conducir a un desbordamiento de búfer de pila. Dado que el atacante también puede controlar los datos de píxeles asociados transmitidos por el servidor, el desbordamiento puede ser explotable para sobrescribir memoria de pila adyacente. Esta vulnerabilidad está corregida en la versión 3.24.0.

References

https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-rrqm-46rj-cmx2exploit, patch, vendor-advisory
https://github.com/FreeRDP/FreeRDP/commit/83d9aedea278a74af3e490ff5eeb889c016dbb2bpatch
https://access.redhat.com/security/cve/CVE-2026-31806vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2447376issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31806.json
https://access.redhat.com/errata/RHSA-2026:11323vendor-advisory
https://access.redhat.com/errata/RHSA-2026:6743vendor-advisory
https://access.redhat.com/errata/RHSA-2026:6799vendor-advisory
https://access.redhat.com/errata/RHSA-2026:19033vendor-advisory
https://access.redhat.com/errata/RHSA-2026:6918vendor-advisory
https://access.redhat.com/errata/RHSA-2026:10734vendor-advisory
https://access.redhat.com/errata/RHSA-2026:10735vendor-advisory

Sources

SourceRecordLicence
CVE ListCVE-2026-31806 changed 2026-07-15CVE Terms of Use
NVDCVE-2026-31806 changed 2026-07-15Public domain