Join our Newsletter — 33% off our NHI Course

AI agent root access in MCP pipelines: are your controls keeping up?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 16489
Topic starter  

TL;DR: A Supabase and Cursor MCP scenario showed how an LLM agent running with a service_role key could be tricked by support-ticket text into reading private tables and exposing secrets through its own output, according to Pomerium. The failure is not just prompt injection but a governance model that assumes privileged systems can safely interpret untrusted text.

Editorial analysis by NHI Mgmt Group, based on content published by Pomerium: “When AI Has Root: Lessons from the Supabase MCP Data Leak”.

Key questions

Q: What breaks when an AI agent has root-level database access and reads untrusted text?

A: The trust boundary breaks first.

Q: Why does broad agent access create confused-deputy risk in MCP workflows?

A: Because the agent can inherit authority from the backend account while receiving instructions from an untrusted user.

Q: What signs show an AI agent is crossing its intended authority?

A: Look for tool calls outside the expected workflow, repeated access to systems not required for the stated task, and logs that cannot clearly distinguish agent actions from human or service-account activity.

Practitioner guidance

  • Enforce gateway policy before tool execution Place an MCP-aware gateway between the agent and any database or ticketing system so tool calls can be blocked by action, table, and destination.
  • Remove root-equivalent credentials from agents Replace service_role style access with narrowly scoped, short-lived credentials that only allow the minimum required read path.
  • Sandbox agent output before write-back Treat all model output as untrusted until a policy layer verifies it contains no secrets, tokens, or internal identifiers.

Bottom line: The breach shows that an over-privileged AI agent can turn untrusted text into a data-exfiltration path even when the database itself is enforcing row-level security.

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 5 months ago
Posts: 16980
 

Confused-deputy governance is the core failure mode: this incident worked because a privileged non-human identity was allowed to process untrusted content as if it were a command. The service_role key did not merely widen access, it collapsed the boundary between data ingestion and authority. Practitioners should recognise that root-level delegation to an AI agent changes the trust model of the entire workflow.

A few things that frame the scale:

  • 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, the protocol's first year of widespread adoption, according to the State of Secrets Sprawl 2026.

A question worth separating out:

Q: Should teams use service_role style credentials for AI agents at all?

A: Only if the workflow is fully trusted and the agent never processes attacker-controlled content, which is rare. For most deployments, root-equivalent credentials turn the agent into a high-impact proxy. Teams should prefer scoped, short-lived credentials and separate read, write, and display paths.

👉 Read our full editorial: AI agent root access exposes the confused-deputy governance gap



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.