Embedded Malicious Code Affecting ua-parser-js package, versions >=1.0.0 <1.0.1>=0.8.0 <0.8.1>=0.7.29 <0.7.30


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Mature
EPSS
0.5% (78th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-UAPARSERJS-1766952
  • published24 Oct 2021
  • disclosed22 Oct 2021
  • creditUnknown

Introduced: 22 Oct 2021

Malicious CVE-2021-4229  (opens in a new tab)
CWE-506  (opens in a new tab)

How to fix?

Upgrade ua-parser-js to version 1.0.1, 0.8.1, 0.7.30 or higher.

Overview

ua-parser-js is a lightweight JavaScript-based user-agent string parser.

Affected versions of this package are vulnerable to Embedded Malicious Code. A hijack in the maintainer's NPM account led to including an embedded malicious crypto miner in this package, in three versions published versions (preinstall scripts). Specifically, the malicious code reads browser user data files, exports OS credentials copies the cookies DB file from the browser.

Users of affected versions should upgrade as soon as possible and check their systems for suspicious activity. Additionally, all secrets and keys stored on that computer should be rotated immediately from a different computer.

References

CVSS Scores

version 3.1