CVE-2026-40398
High · 7.8CVSS
7.8
EPSS
2.7%
Published
May 12, 2026
CISA due date
—
Cloudanix analysis
A person who already has limited access to a Windows computer could use this flaw to gain full control of that computer unless it is updated.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Privilege Gain
- Component
- Network Service
- Class
- Buffer Overflow
- Remediation
- Patch
- Effort
- Low
- Patch risk
- Low
What it actually does
This vulnerability is a local privilege escalation flaw caused by a heap-based buffer overflow in Windows Remote Desktop components. An attacker who already has authorized, low-privileged local access to an affected Windows workstation or server could trigger memory corruption and potentially execute code with elevated privileges, likely allowing takeover of a higher-privileged service context such as SYSTEM. The issue does not provide unauthenticated remote access by itself; it is most relevant as a post-compromise escalation technique after an attacker has obtained a foothold.
Why it matters to the business
Successful exploitation could let an intruder who already has a basic account or code execution on a Windows host gain full control of that machine, disable security tools, access sensitive data, install persistence, or move laterally. Because the affected product set spans many supported Windows desktop and server versions, exposure may be broad in enterprises even though current exploitation signals are low: EPSS is low and flat, there is no known CISA KEV listing, no ransomware association, and no public exploit maturity reported.
How an attack unfolds
An attacker first obtains legitimate or stolen low-privileged access to an affected Windows system, such as through phishing, credential theft, malware execution, or abuse of an existing account. From that local foothold, the attacker interacts with the vulnerable Windows Remote Desktop component in a way that triggers a heap-based buffer overflow. If exploitation succeeds, the memory corruption condition is converted into elevated code execution. The attacker can then run commands, implant tooling, dump credentials, tamper with defenses, or use the compromised host as a stepping stone for lateral movement. This vulnerability is best understood as a privilege-escalation link in an attack chain rather than an initial remote-entry vulnerability.
How to fix it
Apply the Microsoft security update that addresses CVE-2026-40398 for all affected Windows versions, including Windows 10, Windows 11, Windows Server 2012, 2016, 2019, 2022, 2022 23H2, and 2025. Because no exact fixed build numbers were provided, use Microsoft Update, Windows Server Update Services, Microsoft Configuration Manager, or another trusted patch-management source to deploy the applicable May 2026 or later cumulative security update for each supported OS branch. Prioritize systems where low-privileged users can log on interactively, Remote Desktop Services are enabled, servers host multiple users, administrative jump hosts, and internet-facing systems that could be used after initial compromise. Where immediate patching is not possible, reduce risk by limiting local logon and RDP access, enforcing least privilege, disabling unnecessary Remote Desktop Services, enabling Credential Guard or LSASS protections where supported, and monitoring for unusual privilege-escalation behavior.
How to confirm the fix worked
Confirm remediation by verifying that each affected Windows host has installed the Microsoft security update that supersedes the vulnerable Remote Desktop component for its OS branch. Use centralized patch reporting, Windows Update history, PowerShell inventory, or vulnerability scanning authenticated to the host to confirm the update state. Validate that Remote Desktop exposure is limited to approved systems and users, and that nonessential RDP services are disabled. For compensating controls, confirm that least-privilege policies are enforced, local administrator membership is restricted, endpoint detection is active, and privilege-escalation telemetry is being collected. Re-scan after patch deployment to ensure the vulnerability is no longer reported on Windows 10, Windows 11, and Windows Server assets.
Typical attack path
- Gain low-privileged authenticated access or code execution on an affected Windows workstation or server.
- Confirm the host is running a vulnerable Windows version with the affected Remote Desktop component present.
- Execute a local exploit that triggers the heap-based buffer overflow in the Remote Desktop component.
- Escalate privileges from the initial low-privileged context to an administrative or SYSTEM-level context.
- Disable or evade endpoint defenses and establish persistence if the attack objective requires continued access.
- Use elevated privileges to access sensitive files, dump credentials, deploy additional payloads, or move laterally.
How to detect it
To assess possible prior exploitation, focus on post-compromise privilege-escalation evidence rather than a unique network signature, because this is a local flaw and no public exploit indicators are known. Review Windows Security logs for low-privileged logons followed by sudden administrative activity, especially Event IDs 4624, 4672, 4688, 4697, 4720, 4728, 4732, and 7045 where collected. Examine Sysmon or EDR telemetry for unusual process creation, token manipulation, memory-corruption crashes, suspicious child processes spawned from Remote Desktop or service-hosting contexts, and rapid transitions from standard-user activity to SYSTEM-level command execution. Review System and Application logs for crashes or faults involving Remote Desktop-related components, TermService, svchost.exe hosting Remote Desktop Services, or unexpected service restarts. Correlate with changes to local administrator groups, newly installed services, scheduled tasks, credential-dumping activity, security-tool tampering, and lateral movement shortly after an RDP or local authenticated session. Because no known threat actors or campaigns are currently associated with this CVE, detections should be behavior-based and correlated with patch exposure.
What your security team should do
- Patch affected Windows desktop and server systems with the applicable Microsoft cumulative security update, prioritizing multi-user servers, RDP-enabled systems, administrative workstations, and high-value servers.
- Inventory Windows 10, Windows 11, and Windows Server versions listed as affected and reconcile them against patch-management coverage to identify unmanaged or unsupported systems.
- Restrict RDP and local interactive logon rights to authorized users only; remove unnecessary users from Remote Desktop Users and local Administrators groups.
- Harden post-exploitation controls by enabling endpoint detection, tamper protection, credential theft protections, and command-line/process auditing.
- Monitor for suspicious privilege escalation, unexpected child processes from Remote Desktop-related service contexts, new local administrators, and abnormal service creation after low-privileged logons.
- Treat exploitation risk as moderate: the flaw is high impact after foothold, but current intelligence indicates no KEV listing, no known ransomware use, low stable EPSS, and no public exploit maturity.
The record
Heap-based buffer overflow in Windows Remote Desktop allows an authorized attacker to elevate privileges locally.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-119727 A flaw was found in GStreamer's gst-plugins-bad H.265 video parser. CWE-122
- CVE-2026-110133 A flaw was found in Ghostscript. CWE-122
- CVE-2026-9536 A heap-based buffer overflow vulnerability exists in the vtkWindBladeReader… CWE-122
- CVE-2026-96198 Heap-based buffer overflow in Microsoft Edge (Chromium-based) allows an unauthorized… CWE-122
- CVE-2026-96199 Heap-based buffer overflow in Microsoft Edge (Chromium-based) allows an unauthorized… CWE-122
- CVE-2026-85897 Heap-based buffer overflow in Microsoft Edge (Chromium-based) allows an unauthorized… CWE-122
- CVE-2026-119124 ImageMagick before 7.1.2-34 contains a heap-based buffer overflow in its -morph… CWE-122
- CVE-2026-93523 A heap buffer overflow caused by a XIPassiveUngrabDevice request with an out-of-range… CWE-122