Skip to content

Hidden instructions made MCP agents copy private data into public places

Researchers hid instructions in a public GitHub issue and a support ticket. Agents then copied private repository data into a public pull request and secret tokens into the ticket.2

Get 30 minutes free every day, forever.3SOC 2 Type II499.9% uptime SLA on Pro4
GitHub MCP and Supabase MCPMay 2025Asks first

5 of 50

Stopped Limited: the payment went out through the bank’s own system This case: GitHub MCP and Supabase MCP. The gate asks first.

What happened

Agents followed instructions hidden in an issue and a support ticket.

  1. May 2025. Invariant Labs planted instructions in an issue on a public GitHub repository.

  2. The owner asked. Asked about the issues, the owner’s agent pulled private repository data into a public pull request.

  3. July 2025. General Analysis did the same with a support ticket. Cursor’s agent posted the integration_tokens table into the thread.2

How the gate handles it

With the sealed gate, the public post would have had to wait for approval.

After a private read, nothing would have gone public without a person’s OK, and secrets would have been removed on the way in. Press Play to watch the same call.5

Public pull request write after a private repo read; a secret in a tool resultSample6
  1. requesttools/call {"name":"create_pull_request","arguments":{"repo":"owner/public-repo"}}Asks first
  2. resulttools/call {"name":"execute_sql"} returns integration_tokens rows{redacted: [secrets]}

Asks firstAnd secrets in tool results are removed before the agent sees them.

How easy

A repo owner could make public writes ask first after a private read, in three steps.

Sample
Seal a keygithub
GitHub token
Paste your GitHub token
Your agent never sees the token.
MCP rulesgithub
Reads of your repositories
Public writes after private reads
Remove secrets from tool resultscard numbers, US SSNs, IBANs and secrets
Applies to every agent in Coding agents.
Where approvals goAsk first
Slack
Microsoft Teams
Telegram
Email
A person approves or denies each call that asks first.

Approvals and signed records come with Pro, Gate only and Custom. On Free, a rule that asks first refuses instead.7

In code

Or in four lines of code.

The same three steps, from the terminal.

Sample
What each line does
1Seal the keysealedbox keys sealThe agent gets sbk_live_2Vn7…d3.
2Set the rulessealedbox rules addPublic writes wait; secrets are removed.
3Connect approvalssealedbox approvals connectAsk-first calls go to #dev.
Try it

Put the gate in front of your agent today.

Run three practice calls in five minutes, then check their records on your own computer. Test mode, on every plan.

Start free$ sealedbox try5-minute practice run9
Scope

What the gate doesn’t change, and three failures like this one.

Related cases
Answers11

Questions about this case and the gate.

Still have a question?Book a callAll questions
Does the gate stop the hidden instructions?

No, the gate checks calls, not prompts. On Pro, Gate only and Custom, a public write after a private read waits for a person; on Free it is refused.

What happens to a secret in a tool result?

It is removed before the agent sees it. Results through the gate’s MCP address are redacted of card numbers, US SSNs, IBANs and secrets.

What about the all-powerful service_role key?

Sealed with SealedBox, it never reaches the agent. It opens only inside the gate, for one call at a time, after the rules pass.

What does it take to connect an MCP client?

One URL in the client’s settings, with the agent’s SealedBox key as the bearer token.