SQL Copilot prompt-only guardrails bypassed: EXEC via variable escalates from SELECT to SYSADMIN

wunderwuzzi23 · x · 2026-10-09

Researcher wunderwuzzi (Johann Rehberger) presents BlueHat Asia research on Microsoft's SQL Copilot in SSMS: its read-only behavior relied on system prompt plus a regex blocklist, and calling EXEC through a variable bypassed both, enabling elevation from SELECT to SYSADMIN. Key lesson: only permissions (not prompts) enforce read-only — if the connection can write, the agent can write. Microsoft patched quickly; he also proposes a database "CONSTITUTION.md" concept. Blog includes full technical details and video demos.

Original post →

More from coding & agent

coding & agent channel →