Skip to content
RCE Advisory Advanced CVE-2023-36006

Microsoft WDAC OLE DB provider for SQL Server Remote Code Execution Vulnerability (CVE-2023-36006)

A flaw in the Microsoft WDAC OLE DB provider for SQL Server lets a malicious SQL server send specially crafted replies to a connecting client. An attacker who persuades an authenticated user to connect to their server could then run arbitrary code inside that user's SQL client application.

Yuki Chen Follow

Originally disclosed on Microsoft

High 8.8 View original

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 SQL database using their SQL 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 SQL client application.

FAQ

According to the CVSS metric, user interaction is required (UI:R). What interaction would the user have to do? An attacker could exploit the vulnerability by tricking an authenticated user (CVSS metric UI:R) into attempting to connect to a malicious SQL server via a connection driver (for example: ODBC and / or OLEDB as applicable).

FAQ

How could an attacker exploit this vulnerability? An attacker could exploit the vulnerability by tricking an authenticated user into attempting to connect to a malicious SQL server via OLEDB, which could result in the server receiving a malicious networking packet. This could allow the attacker to execute code remotely on the client.

Microsoft WDAC OLE DB provider for SQL

Microsoft WDAC OLE DB provider for SQL

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 the OLE DB provider for SQL Server failed to properly validate or handle specially crafted replies from a server, leading to memory corruption in the client process.

Impact

An attacker could execute arbitrary code on the victim's machine, but only after the victim is tricked into connecting to the attacker's server, so user interaction is required.

What the attacker needed

Victim connects to attacker's SQL server; authenticated user; user interaction required

The fix

Microsoft marked customer action as required, so users should apply the vendor's update; the text does not describe the code change itself.

How it was found

  1. Trick an authenticated user into connecting to a malicious SQL server through a connection driver such as ODBC or OLEDB.
  2. Have the malicious server send specially crafted replies to the connecting client.
  3. The crafted replies exploit the vulnerability and allow code execution in the context of the user's SQL client application.

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.

When a program like a database client connects to a server, the server sends data back that the client has to read and understand. Here, the client software that talks to SQL Server did not handle some of that incoming data safely, so a hostile server could take over the program on the victim's computer. The victim has to be convinced to connect to the attacker's fake database server first.

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.