Credential theft and cryptomining via malicious install script
Published May 24, 2022 · Updated Apr 15, 2025
Embedded malware in UAParser.js 0.7.29, 0.8.0, and 1.0.0 allows attackers to steal credentials and perform cryptocurrency mining during installation. The package's preinstall.js script selects a Linux shell script or Windows batch file, downloads an XMRig payload, and on Windows loads a password-stealing DLL. Execution requires installation of a compromised release; Linux hosts run the cryptominer outside four excluded countries, while Windows hosts also expose stored application and Credential Manager passwords.
Summary
What happened
Embedded malware in UAParser.js 0.7.29, 0.8.0, and 1.0.0 allows attackers to steal credentials and perform cryptocurrency mining during installation. The package's preinstall.js script selects a Linux shell script or Windows batch file, downloads an XMRig payload, and on Windows loads a password-stealing DLL. Execution requires installation of a compromised release; Linux hosts run the cryptominer outside four excluded countries, while Windows hosts also expose stored application and Credential Manager passwords.
The record
- CVE
- CVE-2021-4229
- Published
- May 24, 2022
- Updated
- Apr 15, 2025
- Vendor
- Faisal Salman
- Product
- UAParser.js
- Classifications
- CWE-506, CWE-912, T1496, T1059.001, T1218.010, T1555
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Oct 22, 2021Exploitation reportedMalicious ua-parser-js releases distributed through npm
- May 24, 2022CVE publishedPublication date reported by the CVE source.
- Apr 15, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0.7.29
- Affected versionversion=0.8.0
- Affected versionversion=1.0.0
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Reported exploitation
- Malicious ua-parser-js releases distributed through npmreported exploitation
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo