CVE-2026-22851: 
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-22851 is a heap use-after-free vulnerability in FreeRDP's SDL client caused by a race condition between the RDPGFX dynamic virtual channel thread and the SDL render thread. It affects all FreeRDP versions up to and including 3.20.0, and was disclosed on January 14, 2026, with a fix released the same day in version 3.20.1. Only FreeRDP-based clients using the SDL3 client are affected; FreeRDP-based servers are not impacted. It carries a CVSS v3.1 base score of 5.9 (Medium) and a CVSS v4.0 base score of 6.9 (Medium) (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is improper cross-thread lifetime management of the primary SDL framebuffer (sdl->primary), classified as CWE-362 (Race Condition) and CWE-416 (Use After Free). In sdl_freerdp.cpp, a raw pointer to sdl->primary (an SDL_Surface) is captured into a local variable surface in the SDL render thread. Concurrently, when an RDPGFX_CMDID_RESETGRAPHICS packet is received, the RDPGFX dynamic virtual channel thread destroys and reinitializes sdl->primary via SDL_DestroySurface. The render thread then uses the now-dangling surface pointer for blitting operations (e.g., sdl_draw_to_window_rect), triggering a heap use-after-free. A proof-of-concept AddressSanitizer trace demonstrating the issue is included in the GitHub security advisory (GitHub Advisory).

Impact

Successful exploitation results in a heap use-after-free condition that causes the FreeRDP SDL client to crash, producing a denial-of-service impact with high availability impact. No direct information disclosure or confirmed remote code execution has been demonstrated, though the memory safety violation theoretically could enable further exploitation under specific conditions. The vulnerability is limited to FreeRDP SDL clients connecting to a malicious or compromised RDP server; FreeRDP servers and non-SDL clients are not affected (GitHub Advisory, Red Hat Bugzilla).

Exploitability

A proof-of-concept exploit (AddressSanitizer trace) is publicly available in the GitHub security advisory, but there is no evidence of active in-the-wild exploitation at this time. The vulnerability is remotely exploitable over the network without requiring privileges or user interaction, though high attack complexity is required due to the race condition timing requirements. The EPSS score is approximately 0.038%, indicating low probability of near-term exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. It was discovered and reported by researcher ehdgks0627 (GitHub Advisory).

Exploitation steps

  1. Setup a malicious RDP server: Configure a server capable of sending crafted RDPGFX protocol messages, specifically RDPGFX_CMDID_RESETGRAPHICS packets, to connected clients.
  2. Lure or wait for a vulnerable SDL client to connect: The target must be running FreeRDP's SDL3 client (version ≤ 3.20.0) and connect to the attacker-controlled server.
  3. Trigger the race condition: Send an RDPGFX_CMDID_RESETGRAPHICS packet at a moment when the SDL render thread has captured a raw pointer to sdl->primary but has not yet completed its blitting operation. This causes the RDPGFX channel thread to free and reinitialize sdl->primary while the render thread still holds a dangling reference.
  4. Achieve use-after-free: The render thread calls sdl_draw_to_window_rect using the freed SDL_Surface pointer, triggering a heap use-after-free. Under normal conditions this causes a crash (denial of service); under specific heap layout conditions, further memory corruption may be possible (GitHub Advisory).

Indicators of compromise

  • Process: Unexpected crashes or aborts of the sdl-freerdp client process, particularly with AddressSanitizer errors referencing SDL_BlitCopy, sdl_draw_to_window_rect, or gdi_ResetGraphics in stack traces.
  • Logs: Application crash logs or core dumps from the FreeRDP SDL client showing heap corruption or segmentation faults during active RDP sessions; error messages referencing RDPGFX_CMDID_RESETGRAPHICS handling.
  • Network: Repeated or anomalous RDPGFX_CMDID_RESETGRAPHICS packets sent from an RDP server to the client during an active session, particularly in rapid succession to exploit the race window (GitHub Advisory).

Mitigation and workarounds

Upgrade FreeRDP to version 3.20.1 or later, which fixes the issue by properly locking sdl->primary while it is in use (via the [client,sdl] lock primary while used commit). For systems unable to patch immediately, restrict network access to FreeRDP SDL clients and avoid connecting to untrusted or unknown RDP servers. Monitor FreeRDP SDL client processes for unexpected crashes that may indicate exploitation attempts (GitHub Release, GitHub Advisory).

Community reactions

The vulnerability was part of a batch of nine medium-severity CVEs (CVE-2026-22851 through CVE-2026-22859) disclosed simultaneously by the FreeRDP project on January 14, 2026, all credited to researcher ehdgks0627. Red Hat, SUSE, Fedora, Ubuntu, Debian, and openSUSE have all issued advisories or package updates addressing this and related FreeRDP vulnerabilities. The issue received routine coverage from Linux security news aggregators and distribution security teams, with no notable controversy or exceptional community reaction (GitHub Release, Red Hat Bugzilla).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Affected

bookworm

freerdp2

Affected

sid

freerdp3: 3.20.2+dfsg-1

Fixed

trixie

freerdp3: 3.15.0+dfsg-2.1+deb13u1

Fixed

Ubuntu

Fixed

bionic (esm-apps)

freerdp

Unknown

bionic (esm-infra)

freerdp2

Unknown

devel

freerdp3: 3.20.2+dfsg-1

Fixed

focal (esm-infra)

freerdp2

Unknown

jammy

freerdp2

Unknown

noble

freerdp3: 3.5.1+dfsg1-0ubuntu1.4

Fixed

noble (esm-apps)

freerdp2

Unknown

questing

freerdp3: 3.16.0+dfsg-2ubuntu0.3

Fixed

RHEL / CentOS

Affected

RHEL 8

freerdp.src

Affected

RHEL 9

freerdp.src

Affected

RHEL 10

freerdp.src

Affected

Alpine

Fixed

v3.23

freerdp: 3.22.0-r0

Fixed

Source: This report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-116199CRITICAL9.2
  • NixOS logoNixOS
  • cpe:2.3:a:snipeitapp:snipe-it
NoYesOct 25, 2026
CVE-2026-116201HIGH8.7
  • NixOS logoNixOS
  • cpe:2.3:a:snipeitapp:snipe-it
NoYesOct 25, 2026
CVE-2026-116200HIGH8.2
  • NixOS logoNixOS
  • cpe:2.3:a:snipeitapp:snipe-it
NoYesOct 25, 2026
CVE-2026-2270MEDIUM5.9
  • NixOS logoNixOS
  • kubernetes
NoYesOct 26, 2026
CVE-2026-76654MEDIUM5.8
  • NixOS logoNixOS
  • cpe:2.3:a:kubernetes:kubernetes
NoYesOct 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management