# CVE-2026-31806: FreeRDP has a Heap Buffer Overflow in nsc_process_message() via Unchecked SURFACE_BITS_COMMAND Bitmap Dimensions

- Severity: Critical 9.3 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.75%, higher than 56% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-13T17:40:19.920Z
- Modified: 2026-07-15T02:19:50.480Z
- Weaknesses: CWE-122, CWE-131
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- 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.

(As written by CVE List.)

## Affected

- FreeRDP FreeRDP: < 3.24.0; before 3.24.0
- freerdp: no versions given (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 *; from 2:2.2.0-12.el8_4 before *; from 2:2.2.0-7.el8_6.5 before *; from 2:2.2.0-12.el8_8.5 before *; from 2:2.11.7-1.el9_7.5 before *; from 2:2.4.1-3.el9_0.4 before *; from 2:2.4.1-6.el9_2.6 before *)

## Every score

- GitHub_M: CVSS:4.0 9.3 Critical `CVSS: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-SADP: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

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

## Sources

- CVE List: [CVE-2026-31806](https://www.cve.org/CVERecord?id=CVE-2026-31806), CVE Terms of Use, modified 2026-07-15
- NVD: [CVE-2026-31806](https://nvd.nist.gov/vuln/detail/CVE-2026-31806), Public domain, modified 2026-07-15

---

Page: https://cve.day/CVE-2026-31806 · Whole record: https://cve.day/CVE-2026-31806.json · Rebuilt by cve.day 2026-11-25T22:59:15.882Z
