CVE-2024-36751: Parse uri Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-6fx8-h7jm-663j
CWE-1333 CWE-185
Published
Advisory Summary

CVE-2024-36751 is a MODERATE denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Parse uri libraries in the npm ecosystem. The issue involves parse-uri regular expression denial of service (redos). Remediation is available in the latest vendor maintenance releases.

CVE-2024-36751 at a Glance

CVE Identifier CVE-2024-36751
GHSA Identifier GHSA-6fx8-h7jm-663j
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Parse uri
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2024-36751

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

parse-uri fixed: Latest secure release
npm install parse-uri@Latest secure release
parseuri fixed: Latest secure release
npm install parseuri@Latest secure release
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 parse-uri

How to Check if You Are Affected

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

npm ls parse-uri

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

Note: The npm ls parse-uri 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Parse uri, 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

An issue in parse-uri v1.0.9 allows attackers to cause a Regular expression Denial of Service (ReDoS) via a crafted URL. ## PoC ```js async function exploit() { const parseuri = require("parse-uri"); // This input is designed to cause excessive backtracking in the regex const craftedInput = 'http://example.com/' + 'a'.repeat(30000) + '?key=value'; const result = await parseuri(craftedInput); } await exploit(); ```

CVE-2024-36751 Affected Parse uri Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
parse-uri
npm
≤ 1.0.9
parseuri
npm

References

Frequently Asked Questions

What is CVE-2024-36751?
CVE-2024-36751 is a security vulnerability in Parse uri involving parse-uri Regular expression Denial of Service (ReDoS) under CWE-1333: Inefficient Regular Expression Complexity.
Which Parse uri versions are affected?
Affected versions include releases prior to current release patches across affected packages: parse-uri, parseuri.
What version fixes CVE-2024-36751?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is parse-uri affected?
Yes, parse-uri is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is parseuri affected?
Yes, parseuri is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2024-36751?
CVE-2024-36751 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for CVE-2024-36751?
Run the dependency tree command: 'npm ls parse-uri'. 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-6fx8-h7jm-663j",
  "modified" : "2025-09-03T12:56:48Z",
  "published" : "2025-01-16T00:31:22Z",
  "aliases" : [ "CVE-2024-36751" ],
  "summary" : "parse-uri Regular expression Denial of Service (ReDoS)",
  "details" : "An issue in parse-uri v1.0.9 allows attackers to cause a Regular expression Denial of Service (ReDoS) via a crafted URL.\n ## PoC\n```js\nasync function exploit() {\n    const parseuri = require(\"parse-uri\");\n    // This input is designed to cause excessive backtracking in the regex\n    const craftedInput = 'http://example.com/' + 'a'.repeat(30000) + '?key=value';\n    const result = await parseuri(craftedInput);\n    }\nawait exploit();\n```",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parse-uri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "1.0.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "parseuri"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 2.0.0"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-36751"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Kikobeats/parse-uri/issues/14"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/6en6ar/78168687da94e8aa2e0357f2456b0233"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333", "CWE-185" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-17T15:39:05Z",
    "nvd_published_at" : "2025-01-15T22:15:26Z"
  }
}