Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

IncidentMCP servers and tools

Supabase MCP: a support ticket tricks a Cursor agent into leaking secrets

HighSupabaseCursor

A support ticket with hidden instructions could make a developer's Cursor agent read a secret database table and post it back into the ticket for the attacker, because the agent connected with the all-powerful service_role key.

Replay the attack step by step in the Learning Center

How it happened

  1. The developer uses Cursor with the Supabase MCP server connected with the service_role key.
  2. The attacker opens a ticket telling the agent to read the integration_tokens table and add it to the ticket.
  3. The developer asks Cursor to show the latest ticket, and the agent loads the attacker's text.
  4. The agent runs the SQL and inserts the tokens into the thread, where the attacker reads them.

Impact

An attacker with no database access could read any table the service key reaches.

The fix

A configuration risk rather than a patchable bug; Supabase recommends read-only, project-scoped mode and added safeguards that reduce but do not remove the risk.

Lessons

  • Never connect an agent to a database with admin or service-role credentials.
  • Text customers submit is untrusted input for any agent that reads it.
  • Guardrails around query results help but are not a complete defense.

Sources