Miggo Logo

CVE-2024-41818:
fast-xml-parser vulnerable to ReDOS at currency parsing

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.71043%
Published
7/29/2024
Updated
10/11/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
fast-xml-parsernpm>= 4.3.5, < 4.4.14.4.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from:

  1. The currencyCheckRegex pattern in currency.js has inefficient regex constructs (nested optional groups and unbounded quantifiers)
  2. The original parse function lacked input length validation before regex execution
  3. The PoC demonstrates exploitation with a long string of 13337 tabs followed by '.', which would cause exponential regex evaluation time
  4. The patch added a maxLength check (200 characters) before regex processing, confirming the root cause was unconstrained input size
  5. CWE-1333 (Inefficient Regex) is explicitly listed, matching the described vulnerability mechanism

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Summ*ry * R**OS t**t *xists on *urr*n*y.js w*s *is*ov*r** *y **uss S**urity L**s R&* t**m. ### **t*ils *ttps://*it*u*.*om/N*tur*lInt*lli**n**/**st-xml-p*rs*r/*lo*/v*.*.*/sr*/v*/v*lu*P*rs*rs/*urr*n*y.js#L** *ont*ins * vuln*r**l* r***x ### Po* p

Reasoning

T** vuln*r**ility st*ms *rom: *. T** *urr*n*y****kR***x p*tt*rn in *urr*n*y.js **s in***i*i*nt r***x *onstru*ts (n*st** option*l *roups *n* un*oun*** qu*nti*i*rs) *. T** ori*in*l p*rs* *un*tion l**k** input l*n*t* v*li**tion ***or* r***x *x**ution *