CVE-2024-41655: Tf2 item format Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-8h55-q5qq-p685
CVSS 7.5
CWE-624 CWE-1333
Published
Advisory Summary

CVE-2024-41655 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-624: Executable Regular Expression Error) affecting Tf2 item format libraries in the npm ecosystem. The issue involves (redos) regular expression denial of service in tf2-item-format. Remediation is available by upgrading affected packages to version 5.9.14.

CVE-2024-41655 at a Glance

CVE Identifier CVE-2024-41655
GHSA Identifier GHSA-8h55-q5qq-p685
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-624: Executable Regular Expression Error
Affected Product Tf2 item format
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-41655

To remediate this vulnerability, upgrade all affected Tf2 item format dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

tf2-item-format fixed: 5.9.14
npm install tf2-item-format@5.9.14
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls tf2-item-format

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2024-41655, inspect your project dependencies using npm:

npm ls tf2-item-format

Analyze the terminal output to locate any version of Tf2 item format in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.9.14), your application is affected.

Note: The npm ls tf2-item-format command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-624: Executable Regular Expression Error, where the product uses a regular expression that either (1) contains an executable component with user-controlled inputs, or (2) allows a user to enable execution by inserting pattern modifiers. In Tf2 item format, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary Versions of `tf2-item-format` since at least `4.2.6` are vulnerable to a Regular Expression Denial of Service (ReDoS) attack when parsing crafted user input. ## Tested Versions - `5.9.13` - `5.8.10` - `5.7.0` - `5.6.17` - `4.3.5` - `4.2.6` ### v5 Upgrade package to `^5.9.14` ### v4 No patch exists. Please consult the [v4 to v5 migration guide](https://github.com/danocmx/node-tf2-item-format?tab=readme-ov-file#migrating-from-v4-to-v5) to upgrade to v5. If upgrading to v5 is not possible, fork the module repository and implement the fix detailed below. ## Impact This vulnerability can be exploited by an attacker to perform DoS attacks on any service that uses any `tf2-item-format` to parse user input.

CVE-2024-41655 Affected Tf2 item format Versions

1 component(s)
Fixed Versions:
5.9.14
Product / Package Ecosystem Affected Versions Fixed Version
tf2-item-format
npm
≥ 4.2.6
< 5.9.14
5.9.14

References

Frequently Asked Questions

What is CVE-2024-41655?
CVE-2024-41655 is a security vulnerability in Tf2 item format involving (ReDoS) Regular Expression Denial of Service in tf2-item-format under CWE-624: Executable Regular Expression Error.
Which Tf2 item format versions are affected?
Affected versions include releases prior to 5.9.14 across affected packages: tf2-item-format.
What version fixes CVE-2024-41655?
Upgrading to 5.9.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tf2-item-format affected?
Yes, tf2-item-format is affected in releases prior to 5.9.14. Upgrade your dependency to 5.9.14 or later.
What is the CVSS score of CVE-2024-41655?
CVE-2024-41655 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-41655?
CVE-2024-41655 is classified under CWE-624: Executable Regular Expression Error (The product uses a regular expression that either (1) contains an executable component with user-controlled inputs, or (2) allows a user to enable execution by inserting pattern modifiers.).
How can I check npm dependencies for CVE-2024-41655?
Run the dependency tree command: 'npm ls tf2-item-format'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8h55-q5qq-p685",
  "modified" : "2024-07-23T15:51:54Z",
  "published" : "2024-07-23T14:10:45Z",
  "aliases" : [ "CVE-2024-41655" ],
  "summary" : "(ReDoS) Regular Expression Denial of Service in tf2-item-format",
  "details" : "## Summary\n\nVersions of `tf2-item-format` since at least `4.2.6` are vulnerable to a Regular Expression Denial of Service (ReDoS) attack when parsing crafted user input. \n\n## Tested Versions\n\n- `5.9.13`\n- `5.8.10`\n- `5.7.0`\n- `5.6.17`\n- `4.3.5`\n- `4.2.6`\n\n### v5\nUpgrade package to `^5.9.14`\n\n### v4\nNo patch exists. Please consult the [v4 to v5 migration guide](https://github.com/danocmx/node-tf2-item-format?tab=readme-ov-file#migrating-from-v4-to-v5) to upgrade to v5.\n\nIf upgrading to v5 is not possible, fork the module repository and implement the fix detailed below.\n\n## Impact\n\nThis vulnerability can be exploited by an attacker to perform DoS attacks on any service that uses any `tf2-item-format` to parse user input.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "tf2-item-format"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.2.6"
      }, {
        "fixed" : "5.9.14"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.9.13"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/danocmx/node-tf2-item-format/security/advisories/GHSA-8h55-q5qq-p685"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-41655"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/danocmx/node-tf2-item-format/commit/5cffcc16a9261d6a937bda72bfe6830e02e31eec"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/danocmx/node-tf2-item-format"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/danocmx/node-tf2-item-format/releases/tag/v5.9.14"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333", "CWE-624" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-23T14:10:45Z",
    "nvd_published_at" : "2024-07-23T15:15:05Z"
  }
}