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.
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
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
- Set the MaxReceiveBuffer LDAP policy above its default value on the target.
- Trick an authenticated victim connected to the network into connecting to a malicious LDAP server with their LDAP client.
- 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.