🛡️ CVE-2026-48125 — ua-parser-js

🟡 CVSS 5.3 — Medium ⚠️ Exploit Public CWE-1333 OSV
5.3
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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

Summary

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](https://github.com/faisalman/ua-parser-js/blob/2.0.9/src/main/ua-parser.js#L615):

```js

/ ([\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.

PoC

```js

const { UAParser } = require('ua-parser-js');

const headers = {

'sec-ch-ua-platform': '"Android"',

'sec-ch-ua-mobile': '?1',

'sec-ch-ua-model': '"' + 'A '.repeat(25000) + '"'

};

const t0 = process.hrtime.bigint();

UAParser(headers).withClientHints();

const ms = Number(process.hrtime.bigint() - t0) / 1e6;

if (ms > 100) {

console.log('Potential ReDoS');

}

```

Impact

This vulnerability allows an unauthenticated attacker to trigger a denial-of-service condition in any __server-side__ application that uses UAParser(headers).withClientHints(). A single request with a ~32,000-character model value can consume over 400ms of CPU time, with parsing time growing polynomially with input length. The impact is __availability__ only, there is no confidentiality or integrity impact.

Affected Versions

ua-parser-js versions >=2.0.1, <=2.0.9 are affected. The withClientHints() API is not present in version 0.7.x or 1.x.

Patches

A patch has been released to fix the vulnerable regular expression and limit the Client Hints input. Users should update to version 2.0.10 or later.

References

  • [Regular expression Denial of Service - ReDoS (OWASP)](https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS)

Credits

Thanks to [@sondt99](https://github.com/sondt99), who first reported the issue.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity none, availability low.

Weakness class

CVE-2026-48125 is classified as CWE-1333: Inefficient Regular Expression Complexity. A regular expression backtracks catastrophically on crafted input, consuming CPU out of proportion to input size.

Affected software

CVE-2026-48125 is recorded against 1 package.

  • ua-parser-js

Timeline and source

Published on 15 June 2026 and last revised on 6 August 2026. A public exploit is known to exist, which raises the urgency of patching considerably. A vendor advisory or fix has been published. Record sourced from OSV.

References

github.com (Web)
github.com (Package)

Details

Severity MEDIUM
CVSS Score 5.3
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CWE CWE-1333
Public Exploit ⚠️ Yes
Source OSV
Published 2026-06-15
Updated 2026-08-12
Modified 2026-08-06

Affected Packages

Software From version Fixed in
ua-parser-js

Exploit Protection

Are you running ua-parser-js?

CVE-2026-48125 carries CVSS 5.3 Medium rating and a public exploit already exists. BotEraser checks your installation against this and other known CVE records, and blocks IPs associated with exploit activity.

Check My Site For CVE-2026-48125 →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.