Malicious code in notafollower (npm)
notafollower@1.0.4 on npm contains malicious preinstall and postinstall lifecycle scripts that attempt to exfiltrate AWS IAM credentials from EC2 Instance Metadata Service. The exfiltration destination is incomplete (placeholder 'YOUR_COLLAB'), suggesting this was a proof-of-concept or pre-publish artifact.
- Disclosed
- Last updated
- Blast radius
- AWS EC2, ECS, CodeBuild instances and self-hosted CI runners on EC2 infrastructure
- Ecosystems
- Attack vectors
- Affected entities
- notafollower · 1.0.4
notafollower@1.0.4 was published to npm with embedded malicious code in preinstall and postinstall lifecycle scripts. The scripts target the AWS EC2 Instance Metadata Service (IMDS) at 169.254.169.254, requesting IMDSv2 tokens and enumerating IAM role credentials via the /latest/meta-data/iam/security-credentials/ endpoint.
The malicious code is designed to retrieve temporary AWS IAM access keys, secrets, and session tokens for the instance role and POST them to a hardcoded HTTPS destination. The exfiltration endpoint is specified as 'YOUR_COLLAB' with path '/?real_aws_keys=1', a Burp Collaborator-style placeholder that currently fails DNS resolution.
This attack would execute automatically on any npm install command run on EC2, ECS, CodeBuild instances, or self-hosted CI runners operating on EC2 infrastructure. The credential-collection code path is fully functional; only the destination hostname remains unfilled, consistent with a proof-of-concept or pre-publish artifact.
The incident was identified by Amazon Inspector and credited to the OpenSSF malicious-packages project.
Indicators of compromise
- Packages
- notafollower@1.0.4
Remediation
- Immediately uninstall notafollower@1.0.4 from all systems
- Audit npm install logs for any installations of notafollower@1.0.4
- If installed on EC2/ECS/CodeBuild instances, assume the instance IAM role credentials may be compromised and rotate them immediately
- Review CloudTrail logs for any unauthorized API calls using credentials from affected instances
- Implement npm package allow-listing or scanning policies to prevent installation of malicious packages
- Use IMDSv2 exclusively and restrict IMDS access where possible
- Monitor for any future versions of notafollower and block them from installation
Sources
- GitHub Advisory GHSA-8mmx-gvp3-q5f5 · GitHub Advisory Database
Cite this entry
"Malicious code in notafollower (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 13, 2026; last updated August 13, 2026. https://supplychainattack.org/incident/malicious-code-in-notafollower-npm-18gfhf
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malware in a.poltoradnev-package-a
The npm package a.poltoradnev-package-a contains malware that grants full system compromise to attackers. Any computer with this package installed should be considered fully compromised and all secrets and keys rotated immediately from a different machine.
npmCompromised package - activecritical
Malware in @zynkit/probe
Malware discovered in the npm package @zynkit/probe. Systems with this package installed or running are considered fully compromised, with potential for complete system takeover.
npmCompromised package - activecritical
Malware in club-sauce
Malware discovered in the npm package club-sauce. Any computer with this package installed or running should be considered fully compromised. All secrets and keys must be rotated immediately from a different computer.
npmCompromised package - containedcritical
Malware in awesome-ts-jest
Malware was discovered in the npm package awesome-ts-jest. Systems with this package installed or running should be considered fully compromised and require immediate remediation.
npmCompromised package