URGENT: On September 8, 2025, 18 essential npm packages with 2+ billion weekly downloads were compromised with malicious code. Immediate action required.

Quick Detection Commands
Check Your System Now (30 seconds)
NPM Users – Run this immediately:
npm ls --depth=100 | grep -E '[email protected]|[email protected]|[email protected]|[email protected]|[email protected]|[email protected]' || echo "✅ System Clean"
Yarn Users:
yarn list --pattern '' | grep -E '[email protected]|[email protected]|[email protected]' || echo "✅ System Clean"
Compromised Packages
| Package | Malicious Version | Weekly Downloads | Risk Level |
|---|---|---|---|
| debug | 4.4.2 | 357.6M | CRITICAL |
| chalk | 5.6.1 | 299.99M | CRITICAL |
| ansi-styles | 6.2.2 | 371.41M | CRITICAL |
| strip-ansi | 7.1.1 | 261.17M | CRITICAL |
| color-convert | 3.1.1 | 193.5M | CRITICAL |
| + 13 additional packages |
Immediate Response Plan
Step 1: Remove Compromised Packages
#!/bin/bash
# Clear npm cache
npm cache clean --force
# Remove malicious packages
npm uninstall debug chalk ansi-styles strip-ansi color-convert wrap-ansi
# Delete node_modules and lock files
rm -rf node_modules package-lock.json
Step 2: Install Safe Versions
// Add to package.json
"overrides": {
"debug": "4.3.4",
"chalk": "4.1.2",
"ansi-styles": "4.3.0",
"strip-ansi": "6.0.1",
"color-convert": "2.0.1"
}
# Reinstall dependencies
npm install
npm audit
AWS Automated Response
SSM Document for EC2 Scanning
For AWS users, we’ve created an automated scanning solution using Systems Manager:
- Create SSM Document: Deploy our scanning document to automatically check all EC2 instances
- Run Command: Execute across your entire fleet with one command
- Auto-tagging: Infected instances are automatically tagged for isolation
- Reporting: Results uploaded to S3 with SNS notifications
# Execute scanning across all environments
aws ssm send-command \
--document-name "NPM-Security-Scanner" \
--targets "Key=tag:Environment,Values=Production,Staging,Development" \
--parameters '{"S3BucketName":"security-audits"}'
# Check infected instances
aws ec2 describe-instances \
--filters "Name=tag:npm-scan-status,Values=INFECTED" \
--query 'Reservations[*].Instances[*].InstanceId'
Attack Details
Malicious Payload Capabilities
- Credential Theft: Steals NPM_TOKEN, AWS keys, GitHub tokens
- Backdoor Installation: Downloads and executes remote scripts
- Cryptomining: Installs hidden cryptocurrency miners
- Data Exfiltration: Sends environment variables to attacker servers
CI/CD Pipeline Protection
GitHub Actions Security Check
name: NPM Security Check
on: [push, pull_request]
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check for malicious packages
run: |
if npm ls --depth=100 | grep -E '[email protected]|[email protected]'; then
echo "::error::Malicious packages detected!"
exit 1
fi
- name: Audit
run: npm audit --audit-level=high
Prevention Checklist
- [ ] Implement package version pinning
- [ ] Enable npm audit in CI/CD pipelines
- [ ] Use private npm registry (Verdaccio/Artifactory)
- [ ] Regular dependency audits (weekly)
- [ ] Monitor package integrity hashes
- [ ] Implement least-privilege IAM policies
- [ ] Enable IMDSv2 on all EC2 instances
- [ ] Set up real-time security monitoring
Complete Package List
All 18 affected packages:
- [email protected] (357.6M downloads/week)
- [email protected] (371.41M)
- [email protected] (299.99M)
- [email protected] (261.17M)
- [email protected] (243.64M)
- [email protected] (197.99M)
- [email protected] (193.5M)
- [email protected] (287.1M)
- [email protected] (47.17M)
- [email protected] (191.71M)
- [email protected] (73.8M)
- [email protected] (59.8M)
- [email protected] (3.9M)
- [email protected] (19.2M)
- [email protected] (12.1M)
- [email protected] (26.26M)
- [email protected] (27.48M)
- [email protected] (0.26M)
Resources & Support
- Download SSM Document: Available on GitHub repository
- NPM Security Guide: https://docs.npmjs.com/packages-and-modules/securing-your-code
- Report Issues: [email protected]
Last Updated: September 10, 2025
Severity: CRITICAL
Impact: Global – All Node.js applications
Action Required: Immediate
Stay updated: Subscribe to security alerts and check back regularly for updates on this evolving situation. Report any suspicious activity to [email protected] immediately.
Twodragon에서 더 알아보기
구독을 신청하면 최신 게시물을 이메일로 받아볼 수 있습니다.
