# CVE-2026-31806: FreeRDP has a Heap Buffer Overflow in nsc\_process\_message() via Unchecked SURFACE\_BITS\_COMMAND Bitmap Dimensions

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability: affected before 3.24.0 (CNA); fix release not confirmed
- Status: published
- Published: 2026-03-13 · Modified: 2026-07-15
- Aliases: UBUNTU-CVE-2026-31806, DEBIAN-CVE-2026-31806, ALPINE-CVE-2026-31806
- Record: https://cvemate.com/vulnerability/CVE-2026-31806 · JSON: https://cvemate.com/vulnerability/CVE-2026-31806/json

## Description

```text
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.
```

## Signals

- CVSS: 9.8 critical (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.748%, percentile 56.265%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected

- alpine freerdp (Alpine Linux): \< 3.24.0-r0
- debian freerdp2 (Debian): All versions (No fix recorded)
- debian freerdp3 (Debian): \< 3.15.0+dfsg-2.1+deb13u2 \| \< 3.24.0+dfsg-1
- ubuntu freerdp (Ubuntu): All versions (No fix recorded)
- ubuntu freerdp2 (Ubuntu): All versions (No fix recorded)
- ubuntu freerdp3 (Ubuntu): \< 3.30.0+dfsg-0ubuntu0.24.04.1 \| All versions (No fix recorded)
- freerdp freerdp: \< 3.24.0

## References (first 20 of 24)

- <https://github.com/FreeRDP/FreeRDP/security/advisories/GHSA-rrqm-46rj-cmx2>
- <https://github.com/FreeRDP/FreeRDP/commit/83d9aedea278a74af3e490ff5eeb889c016dbb2b>
- <https://access.redhat.com/security/cve/CVE-2026-31806>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2447376>
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31806.json>
- <https://access.redhat.com/errata/RHSA-2026:11323>
- <https://access.redhat.com/errata/RHSA-2026:6743>
- <https://access.redhat.com/errata/RHSA-2026:6799>
- <https://access.redhat.com/errata/RHSA-2026:19033>
- <https://access.redhat.com/errata/RHSA-2026:6918>
- <https://access.redhat.com/errata/RHSA-2026:10734>
- <https://access.redhat.com/errata/RHSA-2026:10735>
- <https://access.redhat.com/errata/RHSA-2026:10951>
- <https://access.redhat.com/errata/RHSA-2026:10076>
- <https://access.redhat.com/errata/RHSA-2026:9640>
- <https://access.redhat.com/errata/RHSA-2026:9641>
- <https://access.redhat.com/errata/RHSA-2026:6958>
- <https://access.redhat.com/errata/RHSA-2026:6727>
- <https://access.redhat.com/errata/RHSA-2026:6340>
- <https://ubuntu.com/security/CVE-2026-31806>

---

Data as of 2026-12-05T07:09:26.055Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
