Tegoby Attention SpanBlogBook a demo

The MCP server that blind-copied every email

In September 2025, a fake Postmark tool on npm quietly added a blind copy to every email an AI agent sent through it. Tego can't stop this: the copy rode inside the one request to Postmark the task needed, and Postmark’s own servers delivered it.

What happened?

On 25 September 2025, Postmark, an email-sending service, warned its users about an npm package called postmark-mcp that it had not published. It was an MCP server: a small program an AI agent calls as a tool, in this case to send email. Postmark says the publisher "built trust over 15 versions" and then added a backdoor in version 1.0.16 that "secretly BCC'd emails to an external server".

Postmark also wrote that it had never published its MCP server on npm before the incident, and that its own API and services were unaffected.

According to The Register, the attacker appears to have copied the real server's code from GitHub and added one line. That line blind-copied all outgoing mail to an address at giftshop[.]club.

The package had about 1,500 downloads in a week. Koi Security, which found it, estimated about 300 organizations and 3,000 to 15,000 emails a day. CSO Online quotes a higher estimate, about 500 organizations. Postmark told The Register it knew of one customer that used the package.

The Hacker News dates the first upload to 15 September 2025 and version 1.0.16 to 17 September, with 1,643 downloads in total. The package was later deleted from npm. Postmark's advice was to remove it, check email logs, and consider rotating any credentials sent by email in that period.

Why the usual safety didn't catch it

The server had exactly the access its job needed, and the harm used that access. Under the MCP stdio transport, the usual way to run a local tool, the agent's app starts the server as its own child program, running as the same user.

Snyk's analysis shows the rest. The server read a Postmark token (the password for your Postmark account) and a default sender from the environment or a .env file. When the agent asked it to send an email, the server built the message, with the extra blind copy (Bcc) inside, and handed it to the official postmark library.

Postmark's email API takes a send as one POST https://api.postmarkapp.com/email, and Bcc is an ordinary field in it. So the machine made the same encrypted web request the real server makes. It never connected to the attacker. The reports we read describe no extra files, programs or connections.

How it could have been prevented

Tego can't see this one. Tego enforces rules on an agent from outside it, with the Linux kernel. Its network rules decide where a connection goes, not what it carries. The README says so, and Tego's known limits say it is not a tool that inspects outgoing data for leaks.

Picture Claude Code running the server under rules that allow node, pass the Postmark token in, and reach only the AI model and Postmark's API. We checked them against Tego's rules file format; we have not run it. It needs no root.

  • The server runs inside the rules. Tego does not start declared tool servers itself (Tego's feature list). Claude Code starts it, so it runs inside the run. The rule allows node, not one script.
  • No new versions mid-run. With no npm, npx or npm registry allowed, fetching a newer release from inside the run is refused. A clean version installed before 1.0.16 would have stayed clean. If 1.0.16 was already installed, this does not help.
  • Secrets stay unread. Tego's built-in list of secret files refuses reads of ~/.ssh, ~/.aws, ~/.npmrc and project .env files. The attack never needed them.
  • The send goes through. Postmark's API is allowed, so the request leaves with the Bcc inside (how hosts are decided). A connection to any other host would be refused, but this attack made none.
  • The record looks normal. By default Tego's log of the run keeps node starting and a connection to Postmark, and no request contents (record design). A clean run looks the same.

Its rules on web requests check only the method and path, and only for traffic to the AI model (inside encrypted traffic). The copy left from Postmark's servers, outside the machine (inside other services). Tego does not vet packages, so it cannot tell an impostor from the real server.

Tego's strict setup is three built-in rule sets: the agent can't read your secrets, can only reach the hosts you list, and can only change files in the folders you name. The strict setup is still the right habit, since it stops a tool from calling hosts or reading secrets it has no reason to touch. This attack needed neither.

Two settings get you closer to noticing, and neither stops the copy. In Tego's rules file, that's:

YAML
mcp:
  - name: postmark
    command: ["node", "/opt/mcp/postmark-mcp/index.js"]
    tools: {ask: [sendEmail]}
capture: auto
record: full

The first part holds each send until a person approves it in the dashboard. Tego's tool relay decides on tool names only (guide) and is a preview. The server adds the Bcc after you approve, so you would approve a normal-looking email.

The second part, run as root, would likely keep the request's contents. Tego's probes attach to official Node builds, so the stored request would likely show the Bcc, if it used HTTP/1.1 (HTTP/2 is a known gap). We did not test this with Postmark's library, and it tells you only after the copies have gone.

If the agent's app was already running, tego adopt (root) could record it, but an adopted run gets no network rule. On macOS or Windows, none of this applies unless the agent runs in a Linux VM.

What would have helped sits outside Tego:

  • Install tool servers from the vendor's own source. Postmark's official server is on GitHub under ActiveCampaign. The impostor reused its name on npm.
  • Pin and review versions. Don't let a tool fetch its newest release at every start.
  • Watch the provider's side. Postmark advised checking email logs. The provider sees what it delivered; your machine does not.
  • Give each tool the narrowest credential the job needs.

The lesson

A tool server is code that runs with your keys, and whatever it puts into an allowed request goes out. This holds for any agent with an email, chat, ticket or storage tool. For what travels inside an allowed call, trust the source of the tool and the provider's own logs.

Sources (13 links)

Checked on 5 November 2026.