Skip to content
RCE Advisory Advanced CVE-2024-49112

Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability (CVE-2024-49112)

A remote code execution flaw existed in the Windows LDAP service, affecting both LDAP clients and servers. An unauthenticated attacker could potentially run arbitrary code as the LDAP service, but only by first triggering a lookup of a domain they control, and unauthenticated RPC calls would not succeed.

Yuki Chen Follow

Originally disclosed on Microsoft

Critical 9.8 View original

FAQ

What actions do customers need to perform to be protected against this vulnerability? This vulnerability affects both LDAP clients and servers running an affected version of Windows listed in the Security Updates table. Customers must apply the latest security update for their Windows version to be protected against this vulnerability.

FAQ

How could an attacker exploit this vulnerability? A remote unauthenticated attacker who successfully exploited this vulnerability would gain the ability to execute arbitrary code within the context of the LDAP service. However successful exploitation is dependent upon what component is targeted. In the context of exploiting a domain controller for an LDAP server, to be successful an attacker must send specially crafted RPC calls to the target to trigger a lookup of the attacker's domain to be performed in order to be successful. In the context of exploiting an LDAP client application, to be successful an attacker must convince or trick the victim into performing a domain controller lookup for the attacker’s domain or into connecting to a malicious LDAP server. However, unauthenticated RPC calls would not succeed.

FAQ

Could an attacker leverage inbound RPC tunnels connected to Windows 11 to successfully exploit this vulnerability? Yes, an attacker could use an RPC connection to a domain controller to trigger domain controller lookup operations against the attacker's domain.

Windows LDAP - Lightweight Directory Access Protocol

Windows LDAP - Lightweight Directory Access Protocol

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by Yuki Chen. 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 the LDAP service mishandled a lookup of an attacker-controlled domain triggered by crafted RPC calls, allowing code execution in the service context.

Impact

An attacker could potentially execute arbitrary code as the LDAP service, but success depends on the targeted component, and unauthenticated RPC calls would not succeed.

What the attacker needed

Affected Windows version; attacker controls a domain; target performs a lookup of that domain

The fix

It was fixed by applying the latest Windows security update for the affected version.

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.

LDAP is a directory service Windows uses to look up users and computers, and RPC is a way for programs to call code on another machine. This bug meant a crafted request could make the LDAP service look up a domain the attacker controls, and that lookup could lead to the attacker running their own code on the machine. The catch is that the attacker first has to get the target to perform that lookup, so it is not a simple fire-and-forget attack.

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 Yuki Chen

View all

142 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.