Packages intentionally destroying data discovered in NPM

📟 News

Date: 26/05/2025

Socket experts discovered in npm (node package manager) eight malicious packages that were downloaded from the repository more than 6,200 times over the last two years. All these packages could destroy data on users’ workstations.

The malicious packages used typosquatting to mimic names of popular tools, including the React, Vue.js, Vite, Node.js, and Quill ecosystems:

Payloads contained in the malicious packages were used to delete files, intentionally damage data, and disable infected systems.

“What makes this campaign particularly concerning is the diversity of attack vectors — from subtle data corruption to aggressive system shutdowns and file deletion. The packages were designed to target different parts of the JavaScript ecosystem with varied tactics,” — Socket.

Thee malicious packages contained in the npm ecosystem remained undetected for more than two years because their time-based payloads were activate automatically based on system dates: they gradually destroyed framework files, corrupted core JavaScript methods, and disrupted browser data storage mechanisms.

The above-mentioned tactics included:

  • deleting Vue.js framework files;
  • corrupting core JavaScript functions with random data;
  • disrupting all data storage mechanisms in the browser by delivering an advanced three-file attack that breaks “authentication tokens, user preferences, shopping carts, and application state while creating hard-to-diagnose intermittent failures that persist through page refreshes”; and 
  • multi-phase system attacks that delete Vue.js framework files and force the system to shut down.
Script removing Vue.js files that was executed on June 19–30, 2023
Script removing Vue.js files that was executed on June 19–30, 2023

Some of these payloads were scheduled to be triggered on specific dates in 2023; while in other cases, attacks were scheduled to start in July 2023and had no end dates.

Even though all the malware activation dates have passed (June 2023 — August 2024), the threat remains active. Any current installations of these packages would still trigger the system shutdown and file deletion functionality, thus, making them persistent threats.

Users who have installed any of the above-listed packages are advised to check their systems thoroughly and make sure that these packages are no longer active.

Related posts:
2025.04.23 — Improper authentication control vulnerability affects ASUS routers with AiCloud

ASUSTeK Computer Inc. fixed an improper authentication control vulnerability in routers with AiCloud. The bug allows remote attackers to perform unauthorized actions on vulnerable devices. The issue…

Full article →
2025.03.26 — Cloudflare to block all unencrypted traffic to its APIs

According to Cloudflare, effective immediately, only secure HTTPS connections to api.cloudflare.com will be accepted; while all HTTP ports are to be closed. The purpose of this decision…

Full article →
2025.02.12 — 2.8 million IP addresses used to brute-force network devices

The Shadowserver Foundation warns of a massive web login brute-forcing attacks targeting nearly 2.8 million IP addresses per day. Unknown attackers are seeking…

Full article →
2025.03.05 — Polish Space Agency disconnects its network due to hacker attack

Last weekend, the Polish Space Agency (POLSA) had to disconnect all of its systems from the Internet to localize an attack targeting its IT infrastructure. After discovering the intrusion,…

Full article →
2025.04.29 — FBI Offers 10 million USD for information on Salt Typhoon members

The FBI offers up to 10 million USD for information about members of the Chinese hacker group Salt Typhoon and last year's attack that had…

Full article →
2025.03.10 — Nearly a million Windows computers impacted by a malvertising campaign

According to Microsoft, nearly 1 million Windows devices fell victim to a sophisticated malvertising campaign in recent months. Cybercriminals were able to steal credentials, cryptocurrency, and sensitive…

Full article →
2025.01.22 — Fake Homebrew Infects macOS and Linux Machines with infostealer

Attackers use Google ads to disguise themselves as the Homebrew website and distribute malware targeting Mac and Linux systems and stealing logon credentials, browser data, and cryptocurrency wallets.…

Full article →
2025.02.06 — Let's Encrypt to stop sending expiration notification emails

The nonprofit organization announced that, starting June 4, 2025, it will stop sending expiration notification emails to subscribers. The primary reason behind this decision…

Full article →
2025.01.24 — Hundreds of websites impersonating Reddit and WeTransfer spread Lumma Stealer

Sekoia researcher crep1x discovered that hackers are currently using some 1,000 pages impersonating Reddit and WeTransfer. Victims visiting these sites are tricked into…

Full article →
2025.02.03 — PyPI introduces a project archival system to combat malicious updates

The Python Package Index (PyPI) introduces a new project archival system: a project can now be archived to notify users that it's not expected to be updated…

Full article →