Security researchers at Endor Labs have uncovered a sophisticated supply chain attack targeting users of n8n, a popular open-source workflow automation platform. The attack leverages the public npm registry to distribute malicious packages that masquerade as legitimate 'community nodes' for services like Google Ads. Once installed, these nodes trick users into entering sensitive credentials, which are then exfiltrated along with all other credentials stored within the n8n environment. This attack vector is particularly dangerous because n8n platforms often act as centralized vaults for API keys and tokens to numerous enterprise systems. The lack of sandboxing or a vetting process for community nodes in n8n's architecture allows the malicious code to execute with full trust, giving attackers a powerful gateway into a victim's critical business applications.
The attack preys on the trust inherent in the n8n ecosystem. The n8n platform allows users to extend its functionality by installing 'community nodes' from the npm registry. These nodes provide integrations with third-party services.
The attackers' methodology is as follows:
n8n-nodes-hfgjf-irtuinvcm-lasdqewriit), often using typosquatting or confusing names to appear legitimate.This attack vector bypasses traditional endpoint security by targeting the trusted, server-side automation platform itself.
This attack represents an evolution in supply chain threats, moving from targeting individual developer machines to compromising central automation hubs. The core of the vulnerability lies in n8n's architecture, which inherently trusts any installed node.
T1189 - Drive-by Compromise, where the 'drive-by' is the act of installing the package.T1552.001 - Credentials in Files or, more broadly, T1552 - Unsecured Credentials.T1041 - Exfiltration Over C2 Channel.The report notes that this campaign is separate from the recently disclosed RCE vulnerability CVE-2026-21858, but the existence of over 100,000 vulnerable n8n servers highlights the large potential attack surface.
The impact of a successful attack is severe. By stealing the entire credential store, attackers gain access to a wide range of an organization's most critical applications. This could lead to:
The attack turns a tool designed for efficiency into a single point of catastrophic failure.
npm audit and other open-source scanners to analyze package dependencies.M1033 - Limit Software Installation.Use egress filtering to strictly control outbound connections from the n8n server, blocking potential C2 communication.
Mapped D3FEND Techniques:
Maintain an allowlist of approved and vetted npm packages (community nodes) that can be installed on the n8n platform.
Mapped D3FEND Techniques:
While not natively supported by n8n, running nodes in a sandboxed environment would prevent them from accessing the main application's credential store.
Mapped D3FEND Techniques:
The most effective tactical defense against this specific n8n attack is to implement strict outbound traffic filtering for the server hosting the n8n instance. Since n8n workflows connect to a known, finite set of external APIs (e.g., api.salesforce.com, api.stripe.com), the server's firewall rules should be configured to allow outbound connections ONLY to the specific FQDNs and IP addresses of these legitimate services. All other outbound traffic should be denied by default. This 'allowlist' approach to egress control directly blocks the exfiltration phase of the attack (T1041). Even if a malicious node is installed and successfully steals the credentials, it will be unable to send them to the attacker's C2 server. This control turns a potentially catastrophic credential theft incident into a contained, detectable event.
For post-compromise detection, organizations should perform resource access pattern analysis on the APIs connected to n8n. If an attacker successfully exfiltrates an API key for a service like Salesforce, their usage of that key will likely differ from the automated, predictable patterns of the n8n workflow. Security teams should baseline the normal behavior of API keys used by n8n, looking at factors like source IP (should always be the n8n server), time of day, types of queries, and data volume. An alert should be triggered if the same API key is suddenly used from a different IP address or to perform actions inconsistent with its normal workflow function (e.g., a mass data export). This provides a crucial secondary detection layer in case egress filtering fails or is not implemented.

Cybersecurity professional with over 10 years of specialized experience in security operations, threat intelligence, incident response, and security automation. Expertise spans SOAR/XSOAR orchestration, threat intelligence platforms, SIEM/UEBA analytics, and building cyber fusion centers. Background includes technical enablement, solution architecture for enterprise and government clients, and implementing security automation workflows across IR, TIP, and SOC use cases.
Help others stay informed about cybersecurity threats