Windows Remote Desktop Services Remote Code Execution Vulnerability (CVE-2025-26671)
A use-after-free flaw in Windows Remote Desktop Services lets an unauthenticated attacker run arbitrary code over the network. Exploiting it requires winning a race condition against a system with the Remote Desktop Gateway role.
Description
Use after free in Windows Remote Desktop Services allows an unauthorized attacker to execute code over a network.
FAQ
According to the CVSS metric, the attack complexity is high (AC:H). What does that mean for this vulnerability? Successful exploitation of this vulnerability requires an attacker to win a race condition.
FAQ
How could an attacker exploit this vulnerability? An attacker could successfully exploit this vulnerability by attempting to connect to a system with the Remote Desktop Gateway role, triggering the race condition to create a use-after-free scenario, and then leveraging this to execute arbitrary code.
Windows Remote Desktop Services
Windows Remote Desktop Services
Microsoft
Microsoft
Customer Action Required
Yes
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a memory management mistake in Remote Desktop Services where an object is freed but still referenced, creating a use-after-free that can be turned into code execution.
Impact
An unauthenticated attacker could execute arbitrary code over the network, but only if they can win a race condition.
What the attacker needed
Network access to a Remote Desktop Gateway; winning a race condition
The fix
Microsoft requires customers to take action, which in practice means applying the security update for this vulnerability.
How it was found
- Connect to a system that has the Remote Desktop Gateway role.
- Trigger the race condition to create a use-after-free.
- Leverage the use-after-free to execute arbitrary code.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A use-after-free is a memory bug where a program keeps using a piece of memory after it has been freed, so an attacker can put their own data there. Here, an attacker who can reach a Remote Desktop Gateway can try to trigger this bug and run their own code on the server. The catch is that they must win a timing race, which makes it harder to pull off reliably.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.