Embedded malware in ua-parser-js
Published 22 Oct 2021 · Updated 15 Jul 2026
Affected packages
- Affected
- >=0.7.29 <0.7.30
- Fixed in
- 0.7.30
npm install ua-parser-js@0.7.30- Affected
- >=0.8.0 <0.8.1
- Fixed in
- 0.8.1
npm install ua-parser-js@0.8.1- Affected
- >=1.0.0 <1.0.1
- Fixed in
- 1.0.1
npm install ua-parser-js@1.0.1Details
The npm package ua-parser-js had three versions published with malicious code. Users of affected versions (0.7.29, 0.8.0, 1.0.0) should upgrade as soon as possible and check their systems for suspicious activity. See this issue for details as they unfold.
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Is GHSA-pjwm-rvh2-c87w in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected ua-parser-js, and gives you the command that fixes it.
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.