CVE-2020-7733: Regular Expression Denial of Service in ua-parser-js

ua-parser-js Updated 02 Oct 2025

Summary

07/05/2021
Yes i
High
7.5

CVE-2020-7733: Regular Expression Denial of Service in ua-parser-js. Affects ua-parser-js versions < 0.7.22. Fixed in 0.7.22. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

ua-parser-js is an npm package that provides a JavaScript library for parsing user agent strings. It is commonly used to extract information about the user's browser, operating system, and device. The package is widely used in web development projects to enhance user experience and customize content based on the user's device characteristics. However, versions prior to 0.7.22 are vulnerable to a Regular Expression Denial of Service (ReDoS) attack. This vulnerability arises from a regex pattern used to identify Redmi Phones and Mi Pad Tablets user agents.

Vulnerability Detail

The vulnerability in ua-parser-js allows an attacker to exploit the regex pattern used for identifying Redmi Phones and Mi Pad Tablets user agents, leading to a Regular Expression Denial of Service (ReDoS) attack. By providing a specially crafted user agent string, an attacker can cause the regex pattern to exhibit exponential time complexity, resulting in a denial of service condition. This can lead to resource exhaustion, impacting the availability of the application or system. The severity of this vulnerability is rated as HIGH with a CVSS score of 7.5.

How To Fix

Latest published version: 2.0.10 as of 22 Oct 2026

npm install ua-parser-js@2.0.10

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.7.22

This is the first release that contains the fix.

npm install ua-parser-js@0.7.22

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to update the ua-parser-js package to the fixed version to ensure the security of the application.

Conclusion

The ua-parser-js package prior to version 0.7.22 is vulnerable to a Regular Expression Denial of Service (ReDoS) attack. It is crucial to update the package to the fixed version to mitigate this vulnerability. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for ua-parser-js →

Share this vulnerability

FAQ

ua-parser-js is an npm package used for parsing user agent strings in JavaScript. It helps extract information about the user's browser, operating system, and device.

A Regular Expression Denial of Service (ReDoS) attack is a type of vulnerability where a maliciously crafted input can cause a regular expression pattern to exhibit exponential time complexity. This can lead to a denial of service condition, impacting the availability of the application or system.

This vulnerability affects ua-parser-js versions prior to 0.7.22. By providing a specially crafted user agent string, an attacker can trigger a Regular Expression Denial of Service (ReDoS) attack, leading to resource exhaustion and potential denial of service.

This vulnerability is rated as HIGH with a CVSS score of 7.5.

To fix this vulnerability, update the ua-parser-js package to version 0.7.22 or later. Run the command 'npm install ua-parser-js@0.7.22' in your project's root directory.

Related vulnerabilities

Recent vulnerabilities recorded for ua-parser-js.

How To Fix

Latest published version: 2.0.10 as of 22 Oct 2026

npm install ua-parser-js@2.0.10

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.7.22

This is the first release that contains the fix.

npm install ua-parser-js@0.7.22

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback