Visual Studio Code MSSQL Extension Remote Code Execution Vulnerability (CVE-2026-47292)
The Visual Studio Code MSSQL extension includes functionality loaded from an untrusted source, so a crafted file opened in the editor can run attacker-controlled code. An attacker who succeeds gains SYSTEM privileges on the machine.
Originally disclosed on Microsoft
Description
Inclusion of functionality from untrusted control sphere in Visual Studio Code allows an unauthorized attacker to elevate privileges locally.
FAQ
What privileges could be gained by an attacker who successfully exploited this vulnerability? An attacker who successfully exploited this vulnerability could gain SYSTEM privileges.
FAQ
According to the CVSS metric, user interaction is required (UI:R). What interaction would the user have to do? The user would have be enticed to open a malicious file in vscode. Users should never open anything that they do not know or trust to be safe.
Visual Studio Code
Visual Studio Code
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 the MSSQL extension loads or executes functionality from a location an attacker can influence, rather than only from trusted, verified sources.
Impact
An attacker who convinces a user to open a malicious file could gain SYSTEM privileges, the highest level on a Windows machine.
What the attacker needed
Victim opens a malicious file in VS Code; MSSQL extension installed
The fix
Microsoft lists customer action as required, but the text does not describe the specific fix.
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.
Visual Studio Code is a popular code editor, and extensions add features to it. This bug means the MSSQL extension can be tricked into loading something from a file the attacker controls, so opening that file runs the attacker's code with high system rights. The user has to be persuaded to open a malicious file.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.