genai
SECURITY LAB
IncidentsSupply chain

postmark-mcp: The First Known Malicious MCP Server BCC'd Every Email to an Attacker

High severityReal-world incidentSeptember 2025LLM04: Supply ChainLLM02: Sensitive Information Disclosure
Status: Found by Koi Security; Postmark disowned the package on 25 Sep 2025 and its publisher deleted it from npm. Users told to remove it, rotate credentials sent by email and check email logs
Sources checked October 2026
On this page

Fifteen honest releases, then one line: every email the assistant sent gained a hidden extra recipient.

WhenSeptember 2025 (backdoored v1.0.16 released 17 Sep; disclosed 25 Sep)
TargetUsers of the postmark-mcp npm package with AI assistants
Attackernpm publisher 'phanpak' (identity unknown)
ResearcherKoi Security
TechniqueImpostor MCP server: clean releases, then a one-line BCC backdoor
Result1,643 downloads before removal; Koi estimated 3,000–15,000 emails copied a day
Attack flow
  1. 1An unknown developer publishes a near-copy of Postmark's MCP server to npm under Postmark's name
  2. 2After 15 clean releases, version 1.0.16 adds one line that BCCs every outgoing email
  3. 3Assistants using the server keep working while copies go to an attacker-controlled domain

What happened

In late September 2025, Koi Security reported that an npm package called postmark-mcp was quietly copying its users' email. The package presented itself as an MCP server for Postmark, the transactional email service, so that an AI assistant could send mail through a Postmark account. It was not Postmark's. Postmark's official MCP server was hosted on GitHub under the ActiveCampaign organisation and had never been published to npm. A developer using the alias phanpak uploaded the look-alike on 15 September and pushed a run of clean releases. Version 1.0.16, released on 17 September, added a single line that blind-copied every outgoing email to an address on an attacker-controlled domain.

Postmark published a notice on 25 September saying it had no involvement with the package and that its own API and services were unaffected. The package had 1,643 downloads, according to The Hacker News, before its publisher deleted it from npm. Koi estimated that about 300 organisations had it in active use and that 3,000 to 15,000 emails a day were being copied; Postmark told The Register it knew of one affected customer. Koi called it the first malicious MCP server found in the wild.

How the attack worked

No prompt injection was involved. The attacker relied on trust in a name and a clean release history. The package name matched the brand, the code was a near-copy of the legitimate server, and its first fifteen releases, all published within about two days, behaved as expected. Anyone who had not pinned an exact version would pick up the backdoored release on their next install or update.

The assistant using the server saw nothing unusual. Emails went out, tool calls succeeded, and each message gained a hidden BCC recipient. An email MCP server handles exactly the mail an attacker wants: The Register and Snyk listed password resets, MFA codes, invoices, internal memos and customer messages as at risk. Because the server sent mail with the user's own Postmark credentials, every copy left through a channel the user had authorised.

An MCP server runs with the agent's reachWhatever an assistant sends through a tool, the tool's author can read. Installing an MCP server means running a third party's code next to your credentials and data.

Root cause

  • Trust anchored to a name. The brand in the package name was the only link to Postmark, and npm does not check that a package name belongs to the company it mentions.
  • Unpinned updates. The version a team tried and trusted was not necessarily the version that ran after the next update.
  • No view of egress. An extra recipient on outbound mail was invisible to the user and to the assistant.

What a test would have caught

A provenance check before install: who published this package, and does that match the vendor's documented source? Postmark's own server was on GitHub, not npm, so the answer was no. A diff on every version change of an MCP server: comparing a clean release with a backdoored one shows a new hard-coded recipient on outbound mail, which is easy to spot once someone looks. And a functional test against a sandbox account: send one message through the server and read the provider's outbound log, which would list a recipient nobody added.

How to prevent it

  • Install MCP servers from the vendor's documented source, and allowlist publishers rather than trusting package names.
  • Pin exact versions and integrity hashes, and review the diff before any upgrade reaches an agent host.
  • Limit and watch the server: give it scoped credentials and monitor outbound traffic, so an unexpected recipient or domain is noticed.
  • If you installed it, remove it, rotate any credentials sent by email while it ran, and check email logs for suspicious activity, as Postmark advised.

Feel it yourselfThe replay lab is the defender's side of this class: write the publisher allowlist, digest pin and signature gate an MCP host enforces, so a look-alike publisher and a silently changed tool fail to load while the reviewed connector still does.

FAQ

What was the postmark-mcp malicious package?

An npm package that posed as Postmark's MCP server for AI assistants. It copied the legitimate code, built trust over 15 releases, and in version 1.0.16 (17 September 2025) added one line that blind-copied every email sent through it to an attacker-controlled domain. Koi Security found it, and Postmark said it never published the package.

How did postmark-mcp steal emails?

Through the server's normal job. When an AI assistant used it to send an email, the backdoored code added a hidden BCC recipient, so the attacker received a copy of every message, including password resets, invoices or customer mail. No prompt injection was needed: the malicious code ran inside a tool the user had chosen to install.

How do you protect against malicious MCP servers?

Install MCP servers only from the vendor's documented source, allowlist trusted publishers, pin exact versions and integrity hashes, review diffs before upgrading, and monitor what the server sends. If you used postmark-mcp, remove it, rotate any credentials sent by email and check your email logs.

Replay this attack
Write the integrity policy an MCP host enforces before it loads a connector (publisher allowlist, pinned digest, signature gate) so a look-alike publisher and a tool redefined behind a mutable tag both fail to resolve while the reviewed connector still loads — the controls that refuse an impostor package like postmark-mcp and a trusted one that turns malicious in a later version.
Open the live lab
A live, sandboxed lab. It recreates the technique, not this exact product.