CVE-2026-40033

FreeRDP - Heap-buffer-overflow in gdi_CacheToSurface via rectangle validation bypass

Published May 26, 2026 CVSS 4.0 · 8.6 High EPSS 1.4% KEV · Not listed
Description
FreeRDP before 3.26.0 contains a heap-buffer-overflow vulnerability in gdi_CacheToSurface that allows remote attackers to write out-of-bounds heap memory. The vulnerability occurs because rectangle validation clamps coordinates to UINT16_MAX but performs copy operations using unclamped cache entry dimensions, enabling malicious RDP servers to trigger large out-of-bounds writes and potentially achieve remote code execution or client crash.

Analysis

AI-generated

Technical impact

FreeRDP before 3.26.0 contains a heap‑buffer‑overflow (CWE‑122) and out‑of‑bounds write (CWE‑787) vulnerability in the gdi_CacheToSurface function that allows remote attackers to write out‑of‑bounds heap memory. The bug arises because rectangle validation clamps coordinates to UINT16_MAX while copy operations use unclamped cache entry dimensions, enabling malicious RDP servers to trigger large out‑of‑bounds writes that can lead to remote code execution or client crashes.

Affected Systems

The affected product is FreeRDP, all installations of which are vulnerable when their version is older than 3.26.0. Users running FreeRDP clients that connect to Remote Desktop Protocol servers on their networks may be impacted.

Risk and Exploitability

The CVSS score of 8.6 indicates a high severity vulnerability, and the EPSS score of 1% indicates a very low but non-zero exploitation probability. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires an attacker controlling an RDP server that sends specially crafted rectangle parameters to a FreeRDP client; the attack can be performed remotely over the network if the client is reachable. Given the potential for remote code execution, the risk is significant and the vulnerability should be addressed promptly.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the FreeRDP client to version 3.26.0 or newer in which the heap‑buffer‑overflow has been fixed.
  • If an upgrade is not immediately possible, block or restrict inbound RDP traffic to the client from untrusted networks until the patch is applied.
  • Alternatively, review the FreeRDP configuration to disable or limit the use of gdi_CacheToSurface or rectangle validation features that are known to trigger the overflow.

Generated by OpenCVE AI on August 12, 2026 at 02:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8561-1 FreeRDP vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description FreeRDP before 3.26.0 contains a heap-buffer-overflow vulnerability in gdi_CacheToSurface that allows remote attackers to write out-of-bounds heap memory. The vulnerability occurs because rectangle validation clamps coordinates to UINT16_MAX but performs copy operations using unclamped cache entry dimensions, enabling malicious RDP servers to trigger large out-of-bounds writes and potentially achieve remote code execution or client crash.
Title FreeRDP - Heap-buffer-overflow in gdi_CacheToSurface via rectangle validation bypass
First Time appeared Freerdp
Freerdp freerdp
Weaknesses CWE-122
CPEs cpe:2.3:a:freerdp:freerdp:*:*:*:*:*:*:*:*
Vendors & Products Freerdp
Freerdp freerdp
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 8, 2026, 2:02 PM
Reserved
Apr 8, 2026, 1:36 PM
Status
Modified
Published
May 26, 2026, 3:16 PM
Modified
Jul 27, 2026, 1:17 PM