A sophisticated phishing campaign targeting the maintainer of eslint-config-prettier, a widely-used npm package with over 3.5 billion downloads, resulted in malicious code being distributed to thousands of developer projects worldwide.
The incident, discovered on July 18 by ReversingLabs’ automated threat detection system, highlights critical vulnerabilities in modern software development practices, particularly the risks associated with automated dependency updating tools.
Phishing Hits Development Tool
The attack began with a carefully crafted phishing email that impersonated npm’s official support team, using a spoofed address and directing victims to a complete replica of npm’s website hosted on a malicious domain.
The maintainer of eslint-config-prettier fell victim to this deception, providing attackers with credentials to publish unauthorized versions of several packages under his control.
Within hours of gaining access, the attackers published malicious versions of multiple packages, including eslint-config-prettier, eslint-plugin-prettier, synckit, and others.
These compromised packages contained postinstall scripts that deployed the Scavenger remote access trojan (RAT) specifically targeting Windows machines.
Although the malicious versions were removed within approximately two hours, the package’s massive popularity—averaging 36 million weekly downloads—meant the impact was substantial despite the narrow exposure window.
Automation Fuels Breach
The incident’s reach was significantly amplified by automated dependency updating tools like GitHub’s Dependabot, which automatically create pull requests to upgrade package versions without human intervention.
Research revealed that over 14,000 packages had incorrectly declared eslint-config-prettier as a regular dependency rather than a development dependency, making them vulnerable to automatic installation during routine builds.
Notable victims included projects from major organizations, with ReversingLabs identifying 46 package-lock.json files containing the malicious version hash.

Among these was a Microsoft-owned open-source project, demonstrating how even large technology companies can be affected by supply chain attacks.
The automated nature of these updates meant that many development teams unknowingly incorporated the malicious code into their build environments, potentially exposing GitHub tokens and other sensitive credentials to attackers.
The bike fleet management company Dott exemplified this vulnerability, with their automated systems detecting, approving, and merging the malicious dependency update without human oversight.

While GitHub-hosted runners provide some protection through isolated virtual machines, organizations using self-hosted runners face greater risks of persistent compromise.
Development Security Lessons
This incident underscores the paradox of automated dependency management: while tools like Dependabot help teams stay current with security patches, they also create new attack vectors that malicious actors can exploit. Security experts recommend several protective measures:
- Implement update delays: Avoid rushing into dependency upgrades unless resolving critical security issues, as most compromises are detected within days.
- Proper dependency categorization: Clearly separate production dependencies from development dependencies to minimize unnecessary installations.
- Configure build workflows securely: Set up build environments to avoid installing dependencies unnecessary for production systems.
- Require manual security review: Avoid automatic merging of dependency updates without proper vetting and approval processes.
The compromise represents part of a growing trend of supply chain attacks targeting popular open-source packages.
With the increasing sophistication of phishing campaigns and the widespread adoption of automated development tools, organizations must balance the convenience of automation with robust security practices to protect their development environments from similar threats.
AWS Security Services: 10-Point Executive Checklist - Download for Free
Source link