Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. ua-parser-js
  4. ›
  5. CVE-2021-4229

CVE-2021-4229: Embedded malware in ua-parser-js

October 22, 2021 (updated February 17, 2026)

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.

References

  • github.com/advisories/GHSA-pjwm-rvh2-c87w
  • github.com/faisalman/ua-parser-js
  • github.com/faisalman/ua-parser-js/issues/536
  • github.com/faisalman/ua-parser-js/issues/536
  • nvd.nist.gov/vuln/detail/CVE-2021-4229
  • www.npmjs.com/package/ua-parser-js

Code Behaviors & Features

Detect and mitigate CVE-2021-4229 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.7.29 before 0.7.30, version 0.7.29, all versions starting from 0.8.0 before 0.8.1, version 0.8.0, all versions starting from 1.0.0 before 1.0.1, version 1.0.0

Fixed versions

  • 0.7.30
  • 0.8.1
  • 1.0.1

Solution

Upgrade to versions 0.7.30, 0.8.1, 1.0.1 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-829: Inclusion of Functionality from Untrusted Control Sphere
  • CWE-912: Hidden Functionality

Source file

npm/ua-parser-js/CVE-2021-4229.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Thu, 26 Mar 2026 00:19:05 +0000.