left-pad In March 2016, a package called left-pad was unpublished as the result of a naming dispute between Azer Koçulu, an individual software engineer, and
Kik. The package was immensely popular on the platform, being depended on by thousands of projects and reaching 15million downloads prior to its removal. Several projects critical to the JavaScript ecosystem including
Babel and
Webpack depended on left-pad and were rendered unusable. Although the package was republished three hours later, it caused widespread disruption, leading npm to change its policies regarding unpublishing to prevent a similar event in the future.
flatmap-stream In November 2018, it was discovered that a malicious package had been added as a dependency to version 3.3.6 of the popular package event-stream. The malicious package, called flatmap-stream, contained an encrypted payload that stole
bitcoins from certain applications.
pac-resolver In May 2021, pac-resolver, an npm package that received over 3million downloads per week, was discovered to have a
remote code execution vulnerability. The vulnerability resulted from how the package handled config files, and was fixed in versions 5 and greater.
colors and faker In January 2022, the maintainer of the popular package colors pushed changes printing garbage text in an infinite loop.
node-ipc and peacenotwar In March 2022, developer
Brandon Nozaki Miller, maintainer of the node-ipc package, added peacenotwar as a dependency to the package. peacenotwar recursively overwrites an affected machine's hard drive contents with the
heart emoji if they have a Belarusian or Russian IP address. The package also leaves a
text file on the machine containing a message in protest of the
Russian invasion of Ukraine.
Vue.js, which uses node-ipc as a dependency, did not pin its dependencies to a safe version, meaning that some users of Vue.js had the peacenotwar package if they were using its latest version. The package was also briefly present as a dependency in version 3.1 of
Unity Hub. However, a hotfix was released the same day to remove the dependency.
bignum In May 2023, several npm packages including bignum were found to be exploited, stealing user credentials and information from affected machines. Researchers discovered that these packages had been compromised through an exploit involving
Amazon S3 buckets and the node-gyp command line tool.
September 2025 supply chain attack In September 2025, up to 18 popular npm packages were compromised with malware as part of a supply chain attack. Packages were compromised through a
phishing attack on the package maintainers. After the account was compromised attackers began to publish packages with the malware. The malware intercepted cryptocurrency transactions within the browser, redirecting the transactions to the attacker's accounts.
September 2025 self-replicating worm Also in September 2025, a self-replicating worm nicknamed Shai-Hulud appeared that steals GitHub developer credentials from affected systems to spread itself to other projects. As of September 16, the worm affected more than 187 packages.
November 2025 token farms In November 2025,
Amazon Web Services researchers discovered over 150,000 packages hosted on npm that were connected to a Tea
blockchain token farming campaign. == Alternatives ==