Skip to content
Memory corruption Advisory Advanced CVE-2023-35639

Microsoft ODBC Driver Remote Code Execution Vulnerability (CVE-2023-35639)

A flaw in the Microsoft ODBC driver meant that a malicious SQL server could send crafted replies to a connecting client and run arbitrary code inside the user's SQL client application. An attacker could therefore execute code remotely on a victim's machine if the victim was persuaded to connect to the attacker's database server.

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.

Windows ODBC Driver

Windows ODBC Driver

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 ODBC driver did not properly validate the replies it received from a SQL server, allowing a malicious server to trigger memory corruption on the client.

Impact

An attacker could execute arbitrary code on the victim's machine within the context of their SQL client application, but only after the victim was tricked into connecting to the malicious server.

What the attacker needed

Victim uses a vulnerable ODBC driver; victim tricked into connecting to a malicious SQL server

The fix

Microsoft released a security update for the Windows ODBC Driver; the text lists customer action as required but does not describe the code change.

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 driver is software that lets one program talk to a database. Here the driver trusted whatever the database server sent back, so a fake server could send bad data that made the victim's computer run the attacker's code. The victim only had to be tricked into connecting to that fake server.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.