CVE-2024-41818:
fast-xml-parser vulnerable to ReDOS at currency parsing
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.71043%
CWE
Published
7/29/2024
Updated
10/11/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
fast-xml-parser | npm | >= 4.3.5, < 4.4.1 | 4.4.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from:
- The currencyCheckRegex pattern in currency.js has inefficient regex constructs (nested optional groups and unbounded quantifiers)
- The original parse function lacked input length validation before regex execution
- The PoC demonstrates exploitation with a long string of 13337 tabs followed by '.', which would cause exponential regex evaluation time
- The patch added a maxLength check (200 characters) before regex processing, confirming the root cause was unconstrained input size
- CWE-1333 (Inefficient Regex) is explicitly listed, matching the described vulnerability mechanism