Skip to content

N Dobble: npm Package Afflicted by Phishing Scam

npm Package 'eslint-config-prettier' Exposed as a Stealthy Malware Deliverer

Npm Popular Package Suffers in Phishing Intrusion
Npm Popular Package Suffers in Phishing Intrusion

N Dobble: npm Package Afflicted by Phishing Scam

On July 18, 2021, the popular npm package "eslint-config-prettier" was compromised, leading to a potential security threat. The compromised versions of the package were available for less than two hours before being detected and removed.

The compromise occurred after the maintainer of the package fell victim to a phishing campaign. Malicious versions of the package, along with others maintained by the same developer, were published using stolen credentials.

The attack was reported by ReversingLabs' automated detection system and the Socket research team the same day. Victims were lured to a fake npm site with tokenized URLs. The tampered files contained a script designed to drop the Scavenger remote access Trojan (RAT) on Windows systems.

The potential impact was significant due to the package's 36 million weekly downloads. Many projects declare eslint-config-prettier as a direct dependency rather than a devDependency, creating an avenue for downstream compromises.

ReversingLabs detected 46 projects that installed the compromised version during the attack window, including one hosted on a Microsoft-owned repository. The organization affected by the cyberattack was not explicitly identified in the provided search results.

As supply chain attacks increase, dependency hygiene and cautious automation are crucial safeguards. Configuring build workflows to prevent unnecessary installations in production is recommended. Automated tools like GitHub's Dependabot can open and merge pull requests to update dependencies without human review, amplifying potential damage. Avoiding the merging of automated pull requests without manual review is a good practice.

Separating dependencies from devDependencies can help minimize potential threats. Organizations using self-hosted runners may have faced greater risks during the attack. Several repositories, including one managed by the European e-bike company Dott, were found to have automatically pulled in malicious versions of the compromised npm package.

The phishing campaign targeted npm maintainers through emails spoofing the official support address. Delaying non-critical updates can allow time for detection of malicious versions. It is essential to stay vigilant and maintain a secure development environment.

Read also:

Latest