Compromised releases of the widely used ua-parser-js npm package distributed malicious code after an attacker gained access to the maintainer’s npm publishing account or keys. The tainted versions — 0.7.29, 0.8.0, and 1.0.0 — were briefly published as the latest releases and executed a preinstall script that downloaded and ran malware from attacker-controlled infrastructure, including 159.148.186[.]228 and citationsherbe[.]at. Reports said the payload installed cryptocurrency-mining malware on Windows and Linux systems and also deployed information-stealing malware on Windows, putting developer endpoints, CI/CD runners, and potentially production environments at risk.
The package had more than 7 million weekly downloads, raising concern that the compromise could have spread broadly through direct and transitive dependencies, although the total number of affected systems was not known. Maintainers and responders identified the malicious versions in a public GitHub security issue and advised organizations to search lockfiles, caches, node_modules, and internal artifact repositories for the compromised packages, update to a clean release such as 1.0.1, and treat exposed systems as potentially breached by reimaging hosts and rotating credentials and other secrets.

Trace attribution and downstream blast radius.
5 events from the most recent confirmed update back to the earliest known activity.
A GitHub issue titled "Security issue: compromised npm packages of ua-parser-js (0.7.29, 0.8.0, 1.0.0)" was published, documenting the compromised releases. This reflects public disclosure by the project around the malicious package incident.
The highest-risk exposure window occurred on 2021-10-22 from about 12:15 to 16:27 UTC, when the malicious ua-parser-js releases were tagged as the latest versions. During this period, routine installs could pull the compromised package versions automatically.
A supply-chain compromise of the ua-parser-js npm package resulted in malicious versions 0.7.29, 0.8.0, and 1.0.0 being published. The attacker is described as having likely compromised the publisher's npm identity or keys.
Sophos reported that the malicious ua-parser-js releases delivered an XMRig-based Monero miner on Linux and, on Windows, a malicious DLL and packer linked to Qbot-style activity that deployed credential-stealing malware. The analysis also documented geofencing that skipped systems in Russia, Ukraine, Kazakhstan, and Belarus, plus the attacker infrastructure used to fetch payloads.
Following the malicious releases, a clean ua-parser-js version 1.0.1 was available and reported to be free of the implanted code. The malicious versions were also later superseded by benign releases and unpublished.
Vulnerabilities, threat actors, malware, products, organizations, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.
Indicator values are masked on this page. See the values in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.
See attribution and downstream blast radius, and whether this package or vendor reaches your builds.
4 references tracked. Mallory keeps watching after this page renders.
news.sophos.com
Open sourcecybereason.com
Open sourcetruesec.com
Open sourcegithub.com
Open sourceMap indicators from this story to your assets and identify affected systems in minutes.
Every observed campaign, victim, and pivot linked to actors named in this story.
Malware, exploits, and IOCs connected to the activity described here.
YARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Get matching new stories delivered to your team as they break — not the next morning.
Ask questions about this story and take action on the answers.