Miggo Logo

CVE-2024-41655: (ReDoS) Regular Expression Denial of Service in tf2-item-format

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.29366%
Published
7/23/2024
Updated
8/2/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
tf2-item-formatnpm>= 4.2.6, <= 5.9.135.9.14

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The core vulnerability stems from src/shared/decomposeName.ts lines 54-57 where user-controlled input (toRemove) is used to create a dangerous regex pattern. This was patched by replacing the regex with string.replace() calls. The getItemIfTarget function enables exploitation by allowing user input to control the toRemove value. Supporting evidence comes from: 1) The security advisory explicitly identifying decomposeName.ts 2) The PoC showing how user input flows through getItemIfTarget 3) Commit diff showing regex removal in decomposeName.ts 4) CWE-1333 mapping to inefficient regex patterns. Other modified functions showed vulnerable regex patterns but were secondary to the main attack vector.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

## Summ*ry V*rsions o* `t**-it*m-*orm*t` sin** *t l**st `*.*.*` *r* vuln*r**l* to * R**ul*r *xpr*ssion **ni*l o* S*rvi** (R**oS) *tt**k w**n p*rsin* *r**t** us*r input. ## T*st** V*rsions - `*.*.**` - `*.*.**` - `*.*.*` - `*.*.**` - `*.*.*` - `*.

Reasoning

T** *or* vuln*r**ility st*ms *rom `sr*/s**r**/***ompos*N*m*.ts` lin*s **-** w**r* us*r-*ontroll** input (toR*mov*) is us** to *r**t* * **n**rous r***x p*tt*rn. T*is w*s p*t**** *y r*pl**in* t** r***x wit* `strin*.r*pl***()` **lls. T** `**tIt*mI*T*r**