// AI threat desk · 26 Nov 2026
Home/AGENT · Agent Security
Agent SecurityMediumCVECVSS not assigned

Microsoft Copilot for SQL Server Management Studio flaw could run SQL commands

The research covered Microsoft Copilot in SQL Server Management Studio and showed how data could be sent to third-party systems.

AI-generated image of hands at a database administrator’s workstation beside blurred management software and a chat panel.
AI-generated image, not a photo of the event.
Key takeaways
  • A DECLARE and EXEC pattern can bypass the blocklist and invoke stored procedures.
  • After the read-only restriction was bypassed, Copilot could run CREATE, INSERT, UPDATE, DELETE and DROP operations.
  • Embrace The Red said the research was presented at BlueHat Asia 2026 two weeks before the write-up.

Embrace The Red said SQL Copilot uses the connection from the Query Window. A DECLARE and EXEC pattern bypasses the blocklist and can invoke any stored procedure.

Copilot is an AI feature in SQL Server Management Studio, the SQL management product discussed in the research. Embrace The Red said the work was presented at BlueHat Asia 2026 two weeks before the write-up.

On this page

A regex classifier enforced the read-only control

Embrace The Red said the read-only enforcement is a regex-based classifier in the LocalSqlExecutionAccessChecker class.

Embrace The Red said SQL Copilot uses the connection from the Query Window, and that Copilot executes with the privileges of the connected user.

Stored procedures and dynamic queries bypassed the restriction

The researcher gave a DECLARE and EXEC example that bypasses the blocklist and can invoke any stored procedure.

Embrace The Red said Copilot could run CREATE, INSERT, UPDATE, DELETE and DROP operations after the read-only restriction was bypassed.

Prompt injection could reach higher-privileged database actions

Embrace The Red demonstrated indirect prompt injection in which a comment in a file hijacked Copilot, invoked the RestoreVerifyBackupFile tool and caused an UPDATE statement to run.

The research said a user with ALTER permission on an object can attach an AGENTS.md extended property to that object. It also said a lower-privileged database user could influence an AI agent that may later operate with higher-privileged permissions.

In the final demonstration, the attacker’s login was added to the SQL Server sysadmin role.

The research demonstrated two routes for sending database data

Embrace The Red said it demonstrated two ways for Copilot to send data from the database to third-party systems.

Embrace The Red said the write-up covered CVE-2026-65669, a SQL Server elevation-of-privilege vulnerability rated critical by Microsoft.

Embrace The Red recommended keeping installations up to date and said Copilot in SSMS should not be operated with highly privileged database connections.

The research also said Microsoft had added MCP support since the initial research in May 2026, and that a lower-privileged database user could influence an AI agent that later operates with higher-privileged permissions.

What to do now

  1. Keep installations up to date.
  2. Do not operate Copilot in SSMS using highly privileged database connections.

FAQ

What is CVE-2026-65669?

It is a SQL Server elevation-of-privilege vulnerability involving Microsoft Copilot in SQL Server Management Studio. Embrace The Red disclosed the write-up on Sep 30, 2026.

What can the Microsoft Copilot flaw do?

Embrace The Red said that once read-only mode was bypassed, Copilot could run CREATE, INSERT, UPDATE, DELETE and DROP, and that a DECLARE and EXEC pattern can invoke any stored procedure.

How does CVE-2026-65669 bypass read-only mode?

Embrace The Red said the read-only enforcement is a regex-based classifier, and that a DECLARE and EXEC pattern bypasses the blocklist.

Can a lower-privileged database user influence Copilot?

Embrace The Red said a lower-privileged database user can influence an AI agent that may later operate with higher-privileged user permissions. A user with ALTER permission on an object can attach an AGENTS.md extended property to it.

How should users respond to the Copilot for SSMS flaw?

Embrace The Red recommended keeping installations up to date and not operating Copilot in SSMS with highly privileged database connections.

Sources

  1. From SELECT to SYSADMIN with SQL Copilot (CVE-2026-65669), Embrace The RedPrimary
  2. System administrator, Wikipedia
How we checked this story
ClaimSourceStatus
Embrace The Red said the research was presented at BlueHat Asia 2026 two weeks before the write-up.Embrace The RedConfirmed
Embrace The Red said the write-up covered CVE-2026-65669, a SQL Server elevation-of-privilege vulnerability rated critical by Microsoft.Embrace The RedConfirmed
Embrace The Red said Copilot executes with the privileges of the connected user.Embrace The RedConfirmed
Embrace The Red said SQL Copilot uses the connection from the Query Window.Embrace The RedConfirmed
Embrace The Red said a DECLARE and EXEC invocation pattern bypasses the blocklist and can invoke any stored procedure.Embrace The RedConfirmed
Embrace The Red said Microsoft added MCP support since the initial research in May 2026.Embrace The RedConfirmed
Embrace The Red said a user with ALTER permission on an object can attach an AGENTS.md extended property to that object.Embrace The RedConfirmed
Embrace The Red said a lower-privileged database user can influence an AI agent that may later operate with higher-privileged user permissions.Embrace The RedConfirmed
A system administrator is responsible for the upkeep, configuration and reliable operation of computer systems, especially multi-user computers such as servers.WikipediaConfirmed
embracethered.com published its report on Sep 30, 2026.embracethered.comConfirmed

Could not verify

  • Whether CVE-2026-65669 has a numeric CVSS score is not established.
  • Whether CVE-2026-65669 has been exploited in the wild is not established.
  • How many SQL Server Management Studio installations are affected is not established.
  • Whether Microsoft released a fix or specified affected versions is not established.
Explore with AI