Malicious code in @years17/n8n-nodes-helper-utils (npm)
The npm package @years17/n8n-nodes-helper-utils contained malicious code with three independent code execution paths: a postinstall script, top-level module execution, and a malicious node execute() function. The package was designed as a proof-of-concept attack against n8n workflow automation systems.
- Disclosed
- Last updated
- Blast radius
- Any system installing or using @years17/n8n-nodes-helper-utils as an n8n community node
- Ecosystems
- Attack vectors
- Affected entities
- @years17/n8n-nodes-helper-utilsMalicious n8n community node package
The npm package @years17/n8n-nodes-helper-utils shipped with intentionally malicious code targeting n8n automation systems. The package contained three distinct attack vectors:\n\n1. Postinstall Script: A postinstall hook executed id and hostname commands at npm install time, writing output to /tmp/pwned.txt.\n\n2. Module Load Execution: The main index.js file executed system reconnaissance commands (id, hostname, uname -a, ls -la /home, cat /etc/hostname) at require() time, writing results to /tmp/n8n_pwned.txt. Comments in the code explicitly noted execution within n8n's main process with no sandbox isolation, exploiting n8n's auto-loading of community node packages on startup.\n\n3. Workflow Execution: The exported HelperUtils node's execute() function unconditionally ran additional reconnaissance commands (id, hostname, uname -a, ls -la /home, ls -la /) and returned output as node results labeled with pwned: true.\n\nThe self-identifying filenames and output flags indicate this was a proof-of-concept demonstration of supply chain attack capabilities against n8n deployments. The incident was identified and credited to the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- @years17/n8n-nodes-helper-utils
Remediation
- Remove @years17/n8n-nodes-helper-utils from all systems immediately
- Audit npm install logs and system logs for evidence of command execution from the malicious package
- Check for files /tmp/pwned.txt and /tmp/n8n_pwned.txt on affected systems
- Review n8n workflow execution logs for suspicious activity or output labeled 'pwned: true'
- Verify integrity of systems that had this package installed, particularly checking for unauthorized access or data exfiltration
- Update n8n to the latest version and review community node installation policies
- Implement package verification and scanning in npm dependency management workflows
Sources
- GitHub Advisory GHSA-fc5p-j68m-c2xq · GitHub Advisory Database
Cite this entry
"Malicious code in @years17/n8n-nodes-helper-utils (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 12, 2026; last updated August 12, 2026. https://supplychainattack.org/incident/malicious-code-in-years17-n8n-nodes-helper-utils-npm-a018li
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in epic-common-node (npm)
The npm package epic-common-node was found to contain malicious code. The package has been identified and reported through GitHub Security Advisory GHSA-m36g-mhjr-ww2c.
npmCompromised package - containedcritical
Malicious code in epic-common (npm)
The npm package epic-common was found to contain malicious code. The package was identified by Amazon Inspector and reported through the OpenSSF malicious packages database.
npmCompromised package - resolvedcritical
Malicious code in epic-sso (npm)
The npm package epic-sso was found to contain malicious code. The package was identified by Amazon Inspector and reported through the OpenSSF malicious packages database.
npmCompromised package - containedcritical
Malicious code in pfp-forms-sme-loan (npm)
The npm package pfp-forms-sme-loan contains malicious code that executes a hidden loader on import, downloading and running platform-specific native payloads from attacker-controlled Cloudflare Workers hosts or reconstructing them via DNS TXT records under well1.site. Any system that imported this package should be considered compromised.
npmCompromised packageMalicious commit