NetSight
criticalMalware report

GHSA-2fxc-4jrc-5vff

Malicious code in n8n-nodes-pentest-rce (npm)

Impact

## Source: amazon-inspector (2a813bc4a209e75b50151451de1c2a3c4a7e916b181b314416eafc43492b4eb5) On `npm install`, the package's `postinstall` script runs a shell pipeline that reads the Kubernetes service-account token from `/var/run/secrets/kubernetes.io/serviceaccount/token` (truncated to 200 bytes), the pod namespace file, the first 20 sorted environment variables, and host fingerprinting data (`id`, `hostname`, `uname -a`, `ip addr`, `/etc/os-release`, `mount`, `/proc/1/status`, `/proc/1/cgroup`), emitting them between `=RCE_START=` / `=RCE_END=` markers. In typical n8n custom-node installation contexts (n8n cloud, CI build pipelines, container-image builds), install-time stdout is captured into build logs accessible to the attacker. The advertised node code in `dist/PentestNode.node.js` is a no-op (`return [this.getInputData()]`) and `index.js` exports `{}` — the package provides no functional value to a consumer; the install-time shell payload is the entire purpose. The package self-identifies as a 'pentest proof of concept' for RCE in its name and description. The exfiltrated K8s SA token grants API access to the cluster the installer runs in, and the env-var dump commonly contains cloud-provider credentials. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/924e3cfb512a9097299503a28807f7cbe55b2975/osv/malicious/npm/n8n-nodes-pentest-rce/MAL-2026-4617.json))

Affected packages

EcosystemPackageAffectedFixed in
npmn8n-nodes-pentest-rce= 1.0.35none recorded
npmn8n-nodes-pentest-rce= 1.0.31none recorded
npmn8n-nodes-pentest-rce= 1.0.16none recorded
npmn8n-nodes-pentest-rce= 1.0.33none recorded
npmn8n-nodes-pentest-rce= 1.0.43none recorded
npmn8n-nodes-pentest-rce= 1.0.3none recorded
npmn8n-nodes-pentest-rce= 1.0.21none recorded
npmn8n-nodes-pentest-rce= 1.0.32none recorded
npmn8n-nodes-pentest-rce= 1.0.44none recorded
npmn8n-nodes-pentest-rce= 1.0.39none recorded
npmn8n-nodes-pentest-rce= 1.0.11none recorded
npmn8n-nodes-pentest-rce= 1.0.41none recorded
npmn8n-nodes-pentest-rce= 1.0.7none recorded
npmn8n-nodes-pentest-rce= 1.0.28none recorded
npmn8n-nodes-pentest-rce= 1.0.36none recorded
npmn8n-nodes-pentest-rce= 1.0.40none recorded
npmn8n-nodes-pentest-rce= 1.0.29none recorded
npmn8n-nodes-pentest-rce= 1.0.0none recorded
npmn8n-nodes-pentest-rce= 1.0.19none recorded
npmn8n-nodes-pentest-rce= 1.0.42none recorded
npmn8n-nodes-pentest-rce= 1.0.30none recorded
npmn8n-nodes-pentest-rce= 1.0.15none recorded
npmn8n-nodes-pentest-rce= 1.0.8none recorded
npmn8n-nodes-pentest-rce= 1.0.38none recorded
npmn8n-nodes-pentest-rce= 1.0.1none recorded
npmn8n-nodes-pentest-rce= 1.0.37none recorded

Weakness classification

References