n8n-nodes-pentest-rce@1.0.1
Malicious code in n8n-nodes-pentest-rce (npm)
Analysis
Package n8n-nodes-pentest-rce@1.0.1 ships a postinstall script performing aggressive host reconnaissance: reads kubernetes service account token from /var/run/secrets/kubernetes[.]io/serviceaccount/token, dumps env vars (harvesting NPM_TOKEN, GITHUB_TOKEN, etc.), fingerprints host (hostname, uname, /etc/os-release), checks container capabilities and seccomp (sandbox escape feasibility), and enumerates mounts, ip config, /proc/1/cgroup and /proc/1/status. Output is delimited with =RCE_START= / =RCE_END= markers for easy scraping from npm install logs. The n8n node code is a stub that does nothing (PentestNode.node.js just passes input through). The actual product is the postinstall recon — a credential-harvesting and environment-fingerprinting payload. Not benign research: K8s SA token is a real credential, environment dump captures all tokens. No verifiable repo/program reference.
- analyzed by
- Leitwacht
- first seen
- Jun 11, 2026, 01:56 AM
- analyzed
- Jun 11, 2026, 01:58 AM
Related advisories
- anthropic-toolkit@0.2.0
- react-campaign-optimizer@1.0.0
- stream-read-35cf@1.0.0
- internallib_v557@1.0.5
- format-helper-lib@1.0.0
- simple-date-formatter-new-5@1.0.0
- simple-date-formatter-new-2@1.0.0
- simple-date-formatter-new-1@1.0.0
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.