Skip to content
RCE Advisory Advanced CVE-2025-27480

Windows Remote Desktop Services Remote Code Execution Vulnerability (CVE-2025-27480)

A use-after-free flaw exists in the Remote Desktop Gateway Service. An unauthenticated attacker could exploit it by connecting to a system with that role and winning a race condition to execute arbitrary code.

ʌ!ɔ⊥ojv Follow

Originally disclosed on Microsoft

Critical 8.1 View original

Description

Use after free in Remote Desktop Gateway Service allows an unauthorized attacker to execute code over a network.

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.

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.

Remote Desktop Gateway Service

Remote Desktop Gateway Service

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by ʌ!ɔ⊥ojv with Kunlun Lab. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

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 race condition in the Remote Desktop Gateway Service leads to a use-after-free of memory.

Impact

An unauthenticated attacker could execute arbitrary code on the gateway, but exploitation requires winning a race condition, which makes it complex.

What the attacker needed

Network access to a Remote Desktop Gateway; win a race condition

How it was found

  1. Connect to a system that has the Remote Desktop Gateway role.
  2. Trigger the race condition to create a use-after-free.
  3. 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, which can let an attacker control what happens next. Here, an attacker who can reach a Remote Desktop Gateway could try to trigger this bug and run their own code on the server. The catch is that they must win a race condition, meaning they have to get the timing just right.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by ʌ!ɔ⊥ojv

View all

8 more disclosed reports, best first.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.