đ¨ SupplyâChain Malware Attack Strikes npm and PyPI â Millions of Developers at Risk

Researchers at Aikido Security uncovered a sophisticated supplyâchain malware operation that compromised at least 16 popular packages in the npm and PyPI ecosystems, affecting nearly 1,000,000 weekly downloads.
Context: Why the Software Supply Chain Is a Prime Target
In recent years, openâsource package ecosystems (npm, PyPI, RubyGems, etc.) have become a âhighwayâ for attackers into production environments. Data shows over 90% of modern applications depend on thirdâparty components, and a single infected package can rapidly spread through CI/CD pipelines across an organization. Techniques like typoâsquatting, code obfuscation, and delayed payloads make static audits insufficient for detection.
Campaign Details from Aikido Security
- Attack Vector - The threat actor hijacked maintainersâ accounts to publish malicious versions directly to npm and PyPI. For npm, 16 GlueStackârelated libraries (e.g. @gluestack-ui/utils, @react-native-aria/button) were altered to include a Remote Access Trojan (RAT) in lib/commonjs/index.js.
- Malicious Capabilities
- Screenshot capture and keylogging to harvest credentials and authenticated sessions.
- Arbitrary shell command execution, including potential fileâwiping scripts.
- Exfiltration of sensitive files and data to commandâandâcontrol (C2) servers.
- Persistence via postâinstall scripts and installation into system directories (e.g. %LOCALAPPDATA% on Windows).
- PyPI "imad213" Package - Meanwhile, on PyPI, a credentialâharvesting trojan posing as an Instagram growth tool racked up over 3,200 downloads before being removed.
What Makes This Campaign NextâLevel
- Beyond Cryptocurrency: Unlike prior supplyâchain attacks focused on cryptoâmining, this operation aims at sabotage and data theft.
- Advanced Obfuscation: Malicious code leverages whitespace tricks and encrypted strings to evade simple scanners.
- CrossâEcosystem Reach: Targeting both npm and PyPI in parallel indicates a resourceful adversary capable of striking multiple developer communities.
Impact and Major Risks
- Roughly 1 million weekly downloads of compromised npm packagesâan enormous window for malware distribution.
- Operational disruptions and financial losses if malicious scripts delete or encrypt files (e.g.
rm -rf *
on Linux or PowerShellRemove-Item -Recurse
). - Exfiltration of critical data (API keys, database credentials) can lead to widespread breaches and subsequent extortion.
Advanced Defense Strategies
- Dynamic Inventory - Maintain an upâtoâdate SBOM (Software Bill of Materials) and automate dependency scans on every build.
- MultiâLayered Scanning - Donât rely on a single tool: combine Snyk, Dependabot, GitHub Advanced Security, and an EDR/IDS to catch anomalous behavior at runtime.
- Strict Signature Verification - Enforce PGPâsigned packages and validate cryptographic hashes. Block any unsigned or mismatched package versions in CI/CD.
- Isolation & Least Privilege - Run build and runtime processes in containers or VMs with restricted permissions and no direct access to sensitive resources.
- Behavioral Monitoring - Set up alerts for unexpected shell executions, unusual API accesses, and screenshot or data exfiltration attempts.
DevSecOps Best Practices
- Shift Left: Integrate security into coding and build stages, not just after defects become incidents.
- Collaborative Threat Intelligence: Contribute to and consume OSINT feeds, share Indicators of Compromise (IoCs), and participate in security forums.
- Continuous Developer Training: Educate teams on typoâsquatting risks, the importance of dependency audits, and manual review techniques for openâsource code.
Conclusion
Supplyâchain malware is no longer a theoretical threatâitâs a daily reality for software development. Every automatically installed component can become the entry point for a sophisticated attack.
"The security of modern applications is only as strong as the last package installed."