Skip to content
RCE Advisory Advanced CVE-2022-30143

Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability (CVE-2022-30143)

A flaw in the Windows LDAP client allowed a malicious LDAP server to send specially crafted replies that could lead to arbitrary code execution in the context of the victim's LDAP client application. Exploitation required a non-default MaxReceiveBuffer policy and an authenticated victim tricked into connecting to the attacker's server.

Yuki Chen Follow

Originally disclosed on Microsoft

High 7.5 View original

FAQ

Are there any special conditions necessary for this vulnerability to be exploitable? Yes. This vulnerability is only exploitable if the MaxReceiveBuffer LDAP policy is set to a value higher than the default value. Systems with the default value of this policy would not be vulnerable. For more information, please see LDAP policies .

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 prepare the target environment to improve exploit reliability.

FAQ

According to the CVSS metric, the attack vector is network (AV:N) and the user interaction is required (UI:R). What is the target context of the remote code execution? An authenticated victim who is connected to the network must be tricked or persuaded to connect to a malicious LDAP server using their LDAP client application. After the connection is made, the server can send specially crafted replies to the client that exploit the vulnerability and permit execution of arbitrary code within the context of the user's LDAP client application.

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 with Cyber KunLun. 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 improper handling of specially crafted LDAP server replies by the Windows LDAP client when the receive buffer policy is raised above its default.

Impact

An attacker could execute arbitrary code within the context of the victim's LDAP client application, but only on systems where the MaxReceiveBuffer policy was raised above the default and only if the victim was persuaded to connect to the malicious server.

What the attacker needed

MaxReceiveBuffer policy above default; victim connects to malicious LDAP server; attacker controls an LDAP server

How it was found

  1. Set the MaxReceiveBuffer LDAP policy above its default value on the target.
  2. Trick an authenticated victim connected to the network into connecting to a malicious LDAP server with their LDAP client.
  3. Send specially crafted replies from the malicious server to the client to trigger code execution.

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 protocol used to look up directory information such as users and groups. Here the program that connects to a directory server (the client) mishandled unusual replies from a server, so a hostile server could run code on the victim's machine. The victim had to be persuaded to connect to that hostile server, and only machines with a changed buffer setting were affected.

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

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