CVE-2026-22851

FreeRDP RDPGFX ResetGraphics race leads to use-after-free in SDL client (sdl->primary)

Published Jan 14, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.20.1, a race condition between the RDPGFX dynamic virtual channel thread and the SDL render thread leads to a heap use-after-free. Specifically, an escaped pointer to sdl->primary (SDL_Surface) is accessed after it has been freed during RDPGFX ResetGraphics handling. This vulnerability is fixed in 3.20.1.

Analysis

AI-generated

Technical impact

The bug arises from a race condition between the RDPGFX dynamic virtual channel thread and the SDL rendering thread in FreeRDP. During a ResetGraphics operation the SDL surface sdl->primary is freed and the freed pointer is later dereferenced, resulting in a heap use‑after‑free. This flaw can corrupt memory and may allow an attacker to cause program crashes or, in the worst case, execute arbitrary code.

Affected Systems

The vulnerability exists in all releases of FreeRDP prior to version 3.20.1. Users running older versions of the FreeRDP client are susceptible. The affected component is the SDL client (sdl->primary) used for rendering RDP desktops.

Risk and Exploitability

The CVSS score of 6.9 classifies the weakness as moderate severity. The EPSS score of less than 1% indicates a low likelihood of exploitation at the current time, and the flaw is not listed in the CISA KEV catalog. It is most likely triggered through a remote RDP session that exercises the ResetGraphics routine, though the exact attack vector is inferred from the description. Given the modest CVSS rating and low EPSS probability, the overall risk remains moderate but tangible if an attacker can leverage the race condition.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update FreeRDP to version 3.20.1 or later, where the race condition has been fixed.
  • If an upgrade is not immediately possible, consider disabling SDL rendering or unsupported graphics modes that rely on sdl->primary.
  • Apply internal controls to limit graphic channel usage in remote sessions and monitor for unexpected crashes or memory errors.

Generated by OpenCVE AI on April 18, 2026 at 06:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Ubuntu USN Ubuntu USN USN-8105-1 FreeRDP vulnerabilities
History
Type Values Removed Values Added
CPEs cpe:2.3:a:freerdp:freerdp:*:*:*:*:*:*:*:*
Metrics cvssV3_1

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

cvssV3_1

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

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Freerdp
Freerdp freerdp
Vendors & Products Freerdp
Freerdp freerdp
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Description FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.20.1, a race condition between the RDPGFX dynamic virtual channel thread and the SDL render thread leads to a heap use-after-free. Specifically, an escaped pointer to sdl->primary (SDL_Surface) is accessed after it has been freed during RDPGFX ResetGraphics handling. This vulnerability is fixed in 3.20.1.
Title FreeRDP RDPGFX ResetGraphics race leads to use-after-free in SDL client (sdl->primary)
Weaknesses CWE-362
CWE-416
References
Metrics cvssV4_0

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

Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-416

    Use After Free

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 14, 2026, 9:03 PM
Reserved
Jan 12, 2026, 4:20 PM
Status
Analyzed
Published
Jan 14, 2026, 6:16 PM
Modified
Jun 17, 2026, 10:20 AM
Severity
Moderate
Public date
Jan 14, 2026, 5:43 PM