A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-31806

CVE-2026-31806: FreeRDP Buffer Overflow Vulnerability

CVE-2026-31806 is a heap buffer overflow vulnerability in FreeRDP that allows malicious RDP servers to execute arbitrary code. This article covers the technical details, affected versions, impact, and mitigation strategies.

Published: March 20, 2026

CVE-2026-31806 Overview

CVE-2026-31806 is a critical heap buffer overflow vulnerability in FreeRDP, the widely-used open-source implementation of the Remote Desktop Protocol (RDP). The vulnerability exists in the gdi_surface_bits() function which processes SURFACE_BITS_COMMAND messages from RDP servers. When using NSCodec for bitmap decoding, the bmp.width and bmp.height values provided by the server are not properly validated against actual desktop dimensions, allowing a malicious RDP server to trigger a heap buffer overflow with attacker-controlled data.

Critical Impact

A malicious RDP server can exploit this vulnerability to achieve remote code execution on connecting clients by sending crafted bitmap dimensions that cause heap memory corruption with attacker-controlled pixel data.

Affected Products

  • FreeRDP versions prior to 3.24.0
  • Applications and systems using vulnerable FreeRDP libraries
  • RDP client implementations built on FreeRDP

Discovery Timeline

  • 2026-03-13 - CVE CVE-2026-31806 published to NVD
  • 2026-03-17 - Last updated in NVD database

Technical Details for CVE-2026-31806

Vulnerability Analysis

This heap buffer overflow (CWE-122) occurs in the NSCodec bitmap processing path within FreeRDP. The vulnerable gdi_surface_bits() function accepts SURFACE_BITS_COMMAND messages from RDP servers without adequately validating that the bitmap dimensions conform to the actual desktop surface boundaries. When a malicious server supplies bmp.width and bmp.height values that exceed the expected surface size, subsequent memory operations during bitmap decoding write beyond allocated heap buffer boundaries.

The critical aspect of this vulnerability is that attackers can control not only the overflow trigger (via crafted dimensions) but also the overflow content (via the associated pixel data). This level of control over both the overflow size and content significantly increases exploitability for achieving arbitrary code execution.

Root Cause

The root cause is insufficient bounds validation in the nsc_process_message function within libfreerdp/codec/nsc.c. Prior to the fix, the function passed width and height values directly to freerdp_image_copy_no_overlap() without verifying these dimensions against the destination buffer boundaries (nWidth and nHeight). This allowed copy operations to exceed the allocated destination buffer size when server-supplied dimensions were larger than the actual desktop dimensions.

Attack Vector

This vulnerability is exploitable over the network by a malicious RDP server. The attack scenario involves:

  1. An attacker sets up a rogue RDP server or compromises an existing one
  2. A victim client connects to the malicious server using a vulnerable FreeRDP client
  3. The server sends a SURFACE_BITS_COMMAND with oversized bmp.width and bmp.height values
  4. The client's NSCodec decoder processes the message without proper bounds checking
  5. The heap buffer overflow occurs, potentially overwriting adjacent memory with attacker-controlled pixel data
  6. Depending on heap layout, this can lead to arbitrary code execution on the client system

The following patch demonstrates the fix implemented in version 3.24.0:

c
 		return FALSE;
 	}
 
-	return (freerdp_image_copy_no_overlap(pDstData, DstFormat, nDstStride, nXDst, nYDst, width,
-	                                      height, context->BitmapData, PIXEL_FORMAT_BGRA32, 0, 0,
-	                                      nullptr, flip));
+	uint32_t cwidth = width;
+	if (1ull * nXDst + width > nWidth)
+		cwidth = nWidth - nXDst;
+
+	uint32_t cheight = height;
+	if (1ull * nYDst + height > nHeight)
+		cheight = nHeight - nYDst;
+
+	return (freerdp_image_copy_no_overlap(pDstData, DstFormat, nDstStride, nXDst, nYDst, cwidth,
+	                                      cheight, context->BitmapData, PIXEL_FORMAT_BGRA32, 0, 0,
+	                                      0, nullptr, flip));
 }

Source: GitHub Commit

The patch introduces bounds checking by calculating constrained width (cwidth) and height (cheight) values that respect the destination buffer boundaries before performing the copy operation.

Detection Methods for CVE-2026-31806

Indicators of Compromise

  • Unexpected crashes or memory corruption in FreeRDP client processes
  • RDP sessions from unknown or suspicious server addresses
  • Abnormal memory usage patterns in processes utilizing FreeRDP libraries
  • Application crashes occurring during RDP bitmap rendering operations

Detection Strategies

  • Monitor for FreeRDP client process crashes with heap corruption signatures
  • Implement network monitoring to detect RDP connections to untrusted or unknown servers
  • Deploy endpoint detection rules for anomalous memory operations in RDP client processes
  • Review system logs for repeated FreeRDP crashes or segmentation faults

Monitoring Recommendations

  • Enable verbose logging in FreeRDP clients to capture bitmap processing errors
  • Implement network traffic analysis for RDP protocol anomalies
  • Monitor endpoint behavior for signs of post-exploitation activity following RDP sessions
  • Track FreeRDP library version inventory across the environment

How to Mitigate CVE-2026-31806

Immediate Actions Required

  • Upgrade FreeRDP to version 3.24.0 or later immediately
  • Restrict RDP client connections to trusted, known servers only
  • Implement network segmentation to limit exposure of RDP clients
  • Audit all systems and applications using FreeRDP libraries for vulnerable versions

Patch Information

The vulnerability is fixed in FreeRDP version 3.24.0. The fix adds proper bounds checking in the nsc_process_message function to ensure bitmap dimensions do not exceed destination buffer boundaries. The security patch is available via the GitHub Commit. Additional details are available in the GitHub Security Advisory GHSA-rrqm-46rj-cmx2.

Workarounds

  • Only connect to trusted RDP servers until patching is complete
  • Use VPN or other secure tunnels for RDP connections to reduce man-in-the-middle attack risk
  • Disable NSCodec if possible (may impact performance/quality but removes this attack vector)
  • Implement application-level firewall rules to block unauthorized RDP connections
bash
# Check FreeRDP version to identify vulnerable installations
xfreerdp --version

# Update FreeRDP on Debian/Ubuntu systems
sudo apt update && sudo apt install freerdp2-x11

# For systems building from source, update to 3.24.0 or later
git clone https://github.com/FreeRDP/FreeRDP.git
cd FreeRDP
git checkout 3.24.0
cmake -B build && cmake --build build
sudo cmake --install build

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

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechFreerdp

  • SeverityCRITICAL

  • CVSS Score9.3

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS Vector
  • 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-122
  • Vendor Resources
  • GitHub Commit Update

  • GitHub Security Advisory GHSA-rrqm-46rj-cmx2
  • Related CVEs
  • CVE-2026-44420: FreeRDP Buffer Overflow Vulnerability

  • CVE-2026-44421: FreeRDP Buffer Overflow Vulnerability

  • CVE-2026-45700: FreeRDP Buffer Overflow Vulnerability

  • CVE-2026-40033: FreeRDP Buffer Overflow Vulnerability
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.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English