Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member
Home/AI Incident Database/Malicious "postmark-mcp" npm package silently copies every email sent through the MCP server to its author

Malicious "postmark-mcp" npm package silently copies every email sent through the MCP server to its author

A developer published a lookalike Postmark MCP server, built trust over fifteen versions, then added a single line that BCC'd every email the AI agent sent to his own address, the first confirmed malicious MCP server.

Severity: Highmcpnpmbackdoorsupply chain

Incident Overview

On September 26, 2025, a malicious npm package named postmark-mcp was identified as the first confirmed malicious Mail Connector Protocol (MCP) server in the wild. The package was designed to mimic legitimate Postmark MCP servers, a tool used by AI agents to send emails. Over fifteen versions, the developer established trust before introducing a backdoor functionality in a single line of code. This line silently copied every email sent through the MCP server to the attacker’s personal email address, enabling undetected data exfiltration.

The package was published in the npm ecosystem, a widely used repository for JavaScript libraries and tools. Its malicious intent was not detected until after it had been adopted by thousands of users, exposing them to potential data breaches. The incident prompted immediate action from npm, which removed the package from its registry. The discovery also triggered broader scrutiny of MCP packages across the industry, as similar supply chain risks were identified in other agent tools and plugins.

The harm caused by this incident includes supply chain compromise, data exfiltration, and the leakage of confidential information and intellectual property. The stealthy nature of the backdoor—operating silently without altering the package’s core functionality—made it particularly difficult to detect until it was too late.

By intercepting emails at the server level, the malicious package ensured that all communications passed through the attacker’s controlled endpoint. This approach allowed for the extraction of sensitive data, such as internal communications, customer interactions, or proprietary information, without raising immediate suspicion.

The incident underscores the growing risks associated with AI-driven tools and the expanding attack surface created by third-party integrations. As AI agents increasingly rely on external connectors and plugins, the potential for malicious packages to infiltrate these ecosystems poses a significant threat to organizational security.

Possible Root Cause

The root cause of the postmark-mcp incident stems from the package’s deliberate design as a trojanized MCP server. The developer initially published the package with legitimate functionality, allowing it to gain traction and build trust within the developer community. Over fifteen versions, the package maintained its appearance as a trustworthy tool, masking its true intent.

The malicious functionality was introduced in a single line of code that implemented a blind carbon copy (BCC) feature. This line ensured that every email sent through the MCP server was duplicated and forwarded to the attacker’s email address.

The attacker’s ability to evade detection for an extended period highlights several vulnerabilities in the current security landscape. First, the lack of comprehensive visibility into MCP servers and their interactions with AI agents allowed the malicious package to operate undetected. Second, the reliance on public repositories like npm, where packages are often vetted only by community trust rather than rigorous security audits, created an opportunity for malicious actors to exploit.

Additionally, the incident reveals a broader issue: the rapid adoption of AI agents and their dependencies often outpaces security measures. The postmark-mcp case demonstrates how a single line of malicious code can compromise an entire ecosystem, emphasizing the need for proactive security measures in AI tooling.

The attacker’s motivation remains unclear, but the incident aligns with trends observed in other supply chain attacks. These often involve financial gain, competitive espionage, or the acquisition of sensitive data for further exploitation. In this case, the exfiltration of emails could have been used to gather intelligence, blackmail, or sell data on the dark web.

Takeaways

The postmark-mcp incident serves as a critical case study in the evolving threat landscape of AI security, particularly in the context of supply chain attacks targeting agent tools and connectors. One of the most significant takeaways is the urgent need for enhanced visibility into MCP servers and other third-party integrations used by AI agents. Organizations must implement tools and processes that provide real-time monitoring of these components to detect anomalies such as unauthorized data exfiltration.

Another key lesson is the importance of rigorous vetting for packages and dependencies, even those that appear benign. The postmark-mcp package operated for fifteen versions before its malicious intent was uncovered, demonstrating how long a threat can persist if not actively monitored. Developers and security teams should adopt automated security scanning and static analysis tools to identify suspicious behavior in packages, such as unexpected network calls or data transmissions.

The incident also highlights the necessity of proactive governance and policy enforcement for AI-driven tools. By implementing frictionless governance, companies can reduce the risk of malicious packages infiltrating their environments and mitigate potential data breaches.

Real-time prevention mechanisms are essential to counter the speed and stealth of autonomous threats. Traditional security measures, such as endpoint protection, are often ineffective against AI-driven attacks that operate within the boundaries of legitimate tools. Instead, organizations should deploy solutions that offer instant blocking of unsafe interactions, prompt injections, and other malicious activities associated with agentic tools.

The postmark-mcp case is not an isolated incident but part of a broader trend of supply chain compromises affecting AI ecosystems. Reports from security researchers, such as Clawhavoc and MaliciousCorgi, indicate that similar attacks are becoming more frequent, with thousands of users exposed and entire code repositories silently exfiltrated. The average time between compromises is noted to be as short as every 30 minutes, underscoring the urgency of addressing these risks.

Finally, the incident reinforces the need for collaboration between security vendors, open-source communities, and enterprises to share threat intelligence and best practices. By fostering a collective defense strategy, the industry can better identify and neutralize threats before they cause widespread damage. The acquisition of Koi by Palo Alto Networks, for example, signals a step toward integrating specialized agentic endpoint security solutions into broader enterprise defense frameworks.

Developers and IT teams should be educated on the risks associated with third-party packages, the importance of code reviews, and the tools available for detecting malicious behavior.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.