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

CVE-2026-48125: UAParser.js: Unbounded `Sec-CH-UA-Model` parsing can trigger ReDoS in `withClientHints()`

June 15, 2026

A regular expression denial-of-service (ReDoS) vulnerability has been discovered in ua-parser-js when using the Client Hints API. By sending a crafted Sec-CH-UA-Model header to an application that calls UAParser(headers).withClientHints(), an attacker can cause the parser to spend excessive CPU time due to catastrophic backtracking in the device regex:

/ ([\w ]+) miui\/v?\d/i

Unlike when using the User-Agent value, which has a hard limit of UA_MAX_LENGTH = 500, when using Client Hints, values are copied without a length limit before being passed into regex parsing.

References

  • github.com/advisories/GHSA-9h5v-pfqq-x599
  • github.com/faisalman/ua-parser-js/security/advisories/GHSA-9h5v-pfqq-x599
  • nvd.nist.gov/vuln/detail/CVE-2026-48125

Code Behaviors & Features

Detect and mitigate CVE-2026-48125 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 2.0.1 before 2.0.10

Fixed versions

  • 2.0.10

Solution

Upgrade to version 2.0.10 or above.

Impact 5.3 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity
  • CWE-400: Uncontrolled Resource Consumption

Source file

npm/ua-parser-js/CVE-2026-48125.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:16:20 +0000.