Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-41252

CVE-2026-41252: Xrdp Buffer Overflow Vulnerability

CVE-2026-41252 is a buffer overflow vulnerability in Neutrinolabs Xrdp that allows heap-based corruption via malicious VNC servers, potentially enabling DoS or RCE. This article covers technical details, affected versions, and patches.

Published:

CVE-2026-41252 Overview

CVE-2026-41252 is a heap-based buffer overflow [CWE-122] in xrdp, an open source Remote Desktop Protocol (RDP) server maintained by neutrinolabs. The flaw exists in versions 0.10.6 and prior when the server operates in vnc-any mode. During handling of Remote Framebuffer (RFB) protocol color map messages received from a backend VNC server, incoming color indices are not validated against buffer bounds. A malicious VNC server can send crafted messages with out-of-range values to trigger an out-of-bounds write on the heap. Exploitation can produce a denial of service (DoS) or achieve remote code execution (RCE) prior to authentication. The issue is fixed in version 0.10.6.1.

Critical Impact

Unauthenticated remote code execution against xrdp hosts configured to proxy connections to an attacker-controlled VNC server.

Affected Products

  • neutrinolabs xrdp versions 0.10.6 and prior
  • Deployments configured with vnc-any backend mode
  • Linux distributions packaging vulnerable xrdp builds

Discovery Timeline

  • 2026-07-20 - CVE-2026-41252 published to NVD
  • 2026-07-23 - Last updated in NVD database

Technical Details for CVE-2026-41252

Vulnerability Analysis

The vulnerability resides in the RFB protocol parser inside xrdp's vnc-any proxy path. When the xrdp server relays a client RDP session to a backend VNC server, it must translate framebuffer updates and palette data between the two protocols. RFB defines a SetColourMapEntries message that carries a first color index, a color count, and a variable-length RGB triplet array. The parsing routine writes decoded palette entries into a fixed-size heap buffer without confirming that the supplied index range fits within the destination.

Because the write occurs before the RDP client is authenticated to any interactive resource, an attacker who can steer or operate the VNC backend controls the attack payload. Successful memory corruption yields adjacent heap metadata or object pointer overwrite, providing a foundation for code execution as the xrdp process user.

Root Cause

The root cause is a missing bounds check on attacker-controlled indices carried inside RFB color map messages. The routine trusts the first-color and number-of-colors fields from the upstream VNC server and writes past the allocated palette buffer.

Attack Vector

Exploitation requires xrdp to connect to a VNC server controlled or influenced by the attacker. An attacker who compromises the configured VNC backend, or who lures an administrator into pointing xrdp at a hostile endpoint, can send malformed SetColourMapEntries frames. The corruption occurs during the pre-authentication proxy handshake, so no valid RDP credentials are required. See the GitHub Security Advisory GHSA-w5vg-6qmv-j63j for the maintainer's technical breakdown.

Detection Methods for CVE-2026-41252

Indicators of Compromise

  • Unexpected crashes or restarts of the xrdp process with SIGSEGV or SIGABRT in system journals.
  • Outbound TCP sessions from xrdp hosts to VNC ports (5900-5906) on unfamiliar destinations.
  • xrdp configuration files (/etc/xrdp/xrdp.ini) containing vnc-any sections referencing untrusted or externally reachable hosts.

Detection Strategies

  • Inventory hosts running xrdp and identify versions 0.10.6 or earlier via package managers such as dpkg -l xrdp or rpm -q xrdp.
  • Inspect xrdp session logs under /var/log/xrdp*.log for RFB protocol errors, malformed message warnings, or abrupt session terminations.
  • Deploy network monitoring rules that flag VNC traffic originating from RDP gateways to non-approved backends.

Monitoring Recommendations

  • Alert on new child process creation or shell invocations spawned by the xrdp binary, which should not occur in normal operation.
  • Track file integrity of /etc/xrdp/ configuration directories to detect unauthorized backend redirection.
  • Correlate authentication failures on VNC backends with immediately preceding RDP session initiations from the same xrdp host.

How to Mitigate CVE-2026-41252

Immediate Actions Required

  • Upgrade xrdp to version 0.10.6.1 or later on all affected systems.
  • Audit xrdp.ini for vnc-any configurations and restrict backend targets to trusted, static IP addresses.
  • Restrict inbound access to xrdp listeners (tcp/3389) through host firewalls or VPN gating until patching is complete.

Patch Information

The fix is available in the xrdp v0.10.6.1 release. The patch adds validation on the RFB color map index range so out-of-bounds writes cannot occur during palette updates. Administrators using distribution packages should apply vendor-supplied backports as they become available.

Workarounds

  • Disable vnc-any mode in xrdp.ini and use only trusted local session managers such as Xorg or Xvnc bound to 127.0.0.1.
  • Isolate xrdp gateways on segmented networks that cannot reach arbitrary external VNC endpoints.
  • Run the xrdp service under a dedicated low-privilege account and enforce SELinux or AppArmor confinement to limit post-exploitation impact.
bash
# Configuration example: disable vnc-any and pin backend to localhost
sudo sed -i 's/^lib=libvnc.so/#lib=libvnc.so/' /etc/xrdp/xrdp.ini
sudo sed -i 's/^ip=.*/ip=127.0.0.1/' /etc/xrdp/xrdp.ini
sudo systemctl restart xrdp

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.