CVE-2024-38121 Overview
CVE-2024-38121 is a remote code execution vulnerability in the Windows Routing and Remote Access Service (RRAS). Microsoft disclosed the flaw on August 13, 2024 as part of its monthly security updates. The vulnerability affects multiple supported and legacy versions of Windows Server, where RRAS is commonly deployed as a software router and VPN endpoint.
The weakness is classified as a heap-based buffer overflow [CWE-122]. An attacker can trigger code execution in the context of the RRAS process by sending crafted traffic to a vulnerable server, provided a user action is involved in the exploitation chain.
Critical Impact
Successful exploitation allows attackers to execute arbitrary code on Windows Server hosts running RRAS, threatening confidentiality, integrity, and availability of the affected system.
Affected Products
- Microsoft Windows Server 2008 SP2 and Server 2008 R2 SP1 (x64)
- Microsoft Windows Server 2012 and Server 2012 R2
- Microsoft Windows Server 2016, Server 2019, Server 2022, and Server 2022 23H2
Discovery Timeline
- 2024-08-13 - Microsoft publishes advisory and security update for CVE-2024-38121
- 2024-08-13 - CVE-2024-38121 published to NVD
- 2024-08-16 - Last updated in NVD database
Technical Details for CVE-2024-38121
Vulnerability Analysis
The Routing and Remote Access Service provides routing, VPN, and dial-up connectivity on Windows Server. CVE-2024-38121 stems from a heap-based buffer overflow in this service. When RRAS processes a malformed network message, it writes data beyond the bounds of an allocated heap buffer.
The attack vector is network-based and requires no privileges, but the exploit chain requires user interaction. Successful exploitation yields high impact across confidentiality, integrity, and availability. The vulnerability is exploitable across the network without authentication credentials.
Root Cause
The root cause is improper bounds validation in RRAS message handling, categorized as a heap-based buffer overflow [CWE-122]. RRAS allocates a buffer based on assumed input size, then copies attacker-controlled data into that buffer without verifying it fits. The overflow corrupts adjacent heap metadata and structures, enabling control-flow hijacking.
Attack Vector
Exploitation targets a Windows Server with the Routing and Remote Access role enabled and reachable over the network. An attacker sends a crafted protocol message to the RRAS endpoint. The user-interaction requirement means an administrator or operator must perform an action that causes the server to process the malicious input.
Once the overflow triggers, the attacker can execute code in the RRAS process context. Because RRAS typically runs with elevated privileges, this provides a strong foothold for lateral movement, credential theft, and persistence on the affected host.
Microsoft has not released technical exploitation details. Refer to the Microsoft CVE-2024-38121 Advisory for vendor-provided technical context.
Detection Methods for CVE-2024-38121
Indicators of Compromise
- Unexpected crashes or restarts of the RemoteAccess service or svchost.exe instances hosting RRAS
- Anomalous inbound traffic to RRAS-related ports including PPTP (TCP/1723), L2TP (UDP/1701), SSTP (TCP/443), and IKE (UDP/500, UDP/4500)
- Unexpected child processes spawned by the RRAS service, such as cmd.exe, powershell.exe, or other living-off-the-land binaries
- New outbound connections from RRAS hosts to unfamiliar external IP addresses following inbound VPN traffic
Detection Strategies
- Monitor Windows Event Logs for RRAS service faults, particularly Application Error events (Event ID 1000) referencing the RemoteAccess service
- Inspect network traffic to VPN and RRAS endpoints for malformed packets and non-standard protocol behavior
- Correlate process creation events (Event ID 4688 or Sysmon Event ID 1) where the parent process is associated with RRAS
Monitoring Recommendations
- Enable verbose RRAS logging and forward events to a centralized SIEM for correlation across servers
- Track baseline behavior of RRAS hosts to identify deviations in memory usage, thread counts, and network throughput
- Audit which Windows Servers have the Routing and Remote Access role enabled and continuously verify their patch status
How to Mitigate CVE-2024-38121
Immediate Actions Required
- Apply the August 2024 Microsoft security updates to all Windows Server systems running RRAS without delay
- Inventory all servers with the Routing and Remote Access role enabled and prioritize internet-exposed hosts
- Restrict inbound access to RRAS interfaces to known administrative networks and VPN client ranges only
- Validate that legacy systems such as Windows Server 2008 and 2012 have received applicable extended security updates
Patch Information
Microsoft released patches for all affected versions on August 13, 2024. Administrators should consult the Microsoft CVE-2024-38121 Advisory to identify the specific KB article for each Windows Server build and deploy through Windows Update, WSUS, or Microsoft Update Catalog.
Workarounds
- Disable the Routing and Remote Access service on servers that do not require routing or VPN functionality
- Block inbound traffic to RRAS-related ports at perimeter firewalls when the service must remain enabled but is not internet-facing
- Place RRAS endpoints behind additional authentication gateways or restrict access to specific source IP ranges
# Disable the Routing and Remote Access service on Windows Server if not required
sc.exe config RemoteAccess start= disabled
sc.exe stop RemoteAccess
# Verify the service status
sc.exe query RemoteAccess
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

