Dev.to Security 🔐 Cybersecurity 👁 2 📖 4 min read

The fake Postmark MCP server added one line: a BCC. What to check on any tool your agent sends through

In September 2025 a package called postmark-mcp on npm let an agent send email through Postmark, and it did exactly that. From version 1.0.16 it also put a Bcc field on every message, set to an address at giftshop[.]club

In September 2025 a package called postmark-mcp on npm let an agent send email through Postmark, and it did exactly that. From version 1.0.16 it also put a Bcc field on every message, set to an address at giftshop[.]club. One line in the send function, and every email the agent sent had a second recipient that nobody on either end had asked for.

Koi Security spotted the change and published on 25 September. The whole package was unpublished from npm the same day. Koi counted about 1,500 downloads a week and estimated around 300 organizations had it running (The Register). Postmark later told The Register it knew of only one of its own customers using it. Either way, unpublishing a package doesn't remove it from the machines that already installed it.

It wasn't Postmark's package

Postmark's MCP server was open source on GitHub, and Postmark had never published it to npm (Postmark's statement). So the name postmark-mcp on npm was free, and someone took it. Going by The Register's reading, the developer copied the code from Postmark's repo and published it under that name. The BCC came a few versions later. Postmark's official npm package, @activecampaign/postmark-mcp, only appeared two months later, under the company's own scope.

For an MCP server that holds a key to something that sends on your behalf, the check before installing is short. Does the vendor's own documentation link to this exact package name? Is it under the vendor's npm scope, or published from the vendor's GitHub org? If the vendor only ships it on GitHub, the npm package with its name belongs to someone else. On a wallet MCP server the key it holds is a private key, and a copied package there doesn't need a BCC: the key sits in its own process, so it can sign a transaction of its own.

An exact pin kept it out, an egress allowlist didn't

Versions up to 1.0.15 sent mail normally. 1.0.16 went up on 17 September 2025, with 1.0.17 and 1.0.18 within the next half hour, and Snyk found the BCC in those later versions too. A setup pinned to an exact earlier version never got the extra line. A lot of MCP setup instructions use npx -y <package>, and with no version in that line you don't decide which version runs.

A pin isn't the whole fix, since the early versions were the same stranger's code holding your Postmark token. What it does is turn an update into something you read:

# client config: "args": ["-y", "[email protected]"]
npm diff [email protected] [email protected]

A new recipient field in a send function is hard to miss in that output.

An egress allowlist on the server's process would have let this straight through. The copy went out inside a normal Postmark API call, to the one host the allowlist would allow, and Postmark delivered it. It's still worth having for the other common case, a package that posts your data to a host of its own, but it can't see what's inside an allowed request.

The copy was in the sender's own log

Recipients can't see a BCC, so nobody on the receiving end could have noticed. The sending side is different. Postmark's outbound message API returns To, Cc and Bcc for every message it sent, so the extra address sat in the account's own records the whole time. That only helps if something compares it with what your app meant to send.

So keep your own record of who each send was for, and every so often compare it with the provider's record of who actually got it. Anything in Cc or Bcc you didn't put there is an alert. That catches the fake package without knowing anything about it, because it reads what the provider sent, after the last bit of code that could change the message.

Checks for any tool your agent sends through

I give send tools the same questions as signing tools when I look at an agent setup. Email is one case. Posting to Slack, calling a webhook, commenting on a PR and opening a ticket all send data out of your system too.

  • Who picks the recipient? A fixed contact or an allowlist your code checks is fine. A string the model wrote is the weak spot, especially when someone approved "send the status update" as a label and the model filled in the address.
  • Can the tool add recipients you don't see? CC, BCC, forwarding rules, distribution lists, webhook fan-out. Your check and your logs need the full list, not just the main address.
  • Where does your check run? A check in the agent, or an approval screen, runs before the connector. The fake package's line ran inside the connector, after both. Check the request the connector actually sends where you can, and the provider's record afterwards.
  • What does the approval show? The exact recipients, the exact webhook URL, the attachments. I wrote about the payment version of this in November: the approval covered the label and the signature covered more.
  • What is it allowed to send? A read-only agent with one send tool can still paste a stack trace with a secret in it into a public PR thread. Which data can leave through which channel belongs in code, not in the prompt.
  • Does it have its own token? Give the send tool its own API key, so its sends show up on their own and revoking it doesn't take everything else down.

Adapted from a piece our team published on zealynx.io. It adds the version dates from the npm registry, how the change was found, Postmark's own record of Bcc recipients and the send-tool checks from our outbound authority piece, and drops the OWASP mapping.

I wrote this with help from AI for drafting and editing. The opinions and the audit experience are mine.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.