npm package report

Is ua-parser-js safe?

Versions 0.7.29, 0.8.0 and 1.0.0 of ua-parser-js were compromised (cryptominer & password stealer). Other versions are not flagged as malicious.

Do not install ua-parser-js 0.7.29, 0.8.0 or 1.0.0

CRITICALanalyst verified

Cryptominer & password stealer, part of the UA-Parser-JS Compromise 2021 campaign. Added to CyberXYZ 2021-10-22, verified by a CyberXYZ analyst.

// what we observed

Compromised maintainer published versions with embedded cryptominer (jsextension binary) and password-stealing malware. 7M+ weekly downloads affected.

// versions and what to do
Malicious
0.7.29, 0.8.0, 1.0.0
Move to
1.0.41 newest 1.x release, no known advisory
0.7.41 newest 0.x release, no known advisory
2.0.10 current release, no known advisory

If one of these versions was installed, remove it and treat the credentials, tokens and SSH keys on that machine as exposed: rotate them. Check CI runners and container images that installed it too.

npm install ua-parser-js@1.0.41
// reach

5 direct dependencies

1 carry known advisories, worst HIGH

38 packages depend on it

an advisory here reaches each of them

  • hono-utils
  • snack-sdk
Create a free accountfor every dependency path, dependent and what to upgrade
// ai model usage

Tracked for PyPI packages. HuggingFace models declare Python dependencies, so npm packages are not covered.


cvss
7.5
high

CVSS v3.1 base score out of 10

epss
1.8%
medium

chance of exploitation in 30 days, 78th percentile of all CVEs

xyz score
4.5
medium

CyberXYZ composite out of 10

fig. 01 — GHSA-fhg7-m89q-25r3, the advisory selected below

// 6 advisories

GHSA-fhg7-m89q-25r3

HIGHGitHub ratingCVE-2022-25927
// description:

A regular expression denial of service (ReDoS) vulnerability has been discovered in ua-parser-js.

// impact:

This vulnerability bypass the library's MAX_LENGTH input limit prevention. By crafting a very-very-long user-agent string with specific pattern, an attacker can turn the script to get stuck processing for a very long time which results in a denial of service (DoS) condition.

// affected versions:

From version 0.7.30 to before versions 0.7.33 / 1.0.33.

// patches:

A patch has been released to remove the vulnerable regular expression, update to version 0.7.33 / 1.0.33 or later.

// references:

Regular expression Denial of Service - ReDoS

// credits:

Thanks to @Snyk who first reported the issue.

// cvss v3.1 vector

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

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Checked 2026-11-06 at 22:52 UTC. The most recent advisory here was published 2026-06-15. Updated continuously from NVD, GHSA, OSV and CNA feeds.

Think a verdict here is wrong? Tell us — we respond within 2 business days.