{"id":"GHSA-x4hg-hfwf-p9mw","aliases":["GHSA-x4hg-hfwf-p9mw"],"related":[],"kind":"vulnerability","state":"published","title":"@asymmetric-effort/nogginlessdom vulnerable to ReDoS via user-controlled regex in HTMLInputElement pattern validation","summary":"## Summary\n\nThe `HTMLInputElement.checkValidity()` method constructed a `RegExp` directly from the user-controlled `pattern` property without any sanitization or timeout protection. This allowed an attacker to inject a regex with catastrophic backtracking, freezing the event loop.\n\n## Fix\n\nFixed in commit https://github.com/asymmetric-effort/NogginLessDom/commit/25a3cbac665fae5663f8b71c073b80c3152dbe7b on `main`. Added:\n- Pattern length limit (1024 characters)\n- Nested quantifier detection (`hasNestedQuantifiers`) that rejects patterns like `(a+)+` before constructing the regex\n- Patterns exceeding limits are treated as non-matching (safe default)","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"## Summary\n\nThe `HTMLInputElement.checkValidity()` method constructed a `RegExp` directly from the user-controlled `pattern` property without any sanitization or timeout protection. This allowed an attacker to inject a regex with catastrophic backtracking, freezing the event loop.\n\n## Fix\n\nFixed in commit https://github.com/asymmetric-effort/NogginLessDom/commit/25a3cbac665fae5663f8b71c073b80c3152dbe7b on `main`. Added:\n- Pattern length limit (1024 characters)\n- Nested quantifier detection (`hasNestedQuantifiers`) that rejects patterns like `(a+)+` before constructing the regex\n- Patterns exceeding limits are treated as non-matching (safe default)","format":"markdown","source":"ghsa"}],"published":"2026-07-02T20:20:04.000Z","modified":"2026-09-10T03:50:53.053Z","severity":{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.22"}],"ecosystem":"npm","package":"@asymmetric-effort/nogginlessdom","purl":"pkg:npm/%40asymmetric-effort/nogginlessdom","source":"ghsa"}],"references":[{"url":"https://github.com/asymmetric-effort/NogginLessDom/security/advisories/GHSA-x4hg-hfwf-p9mw","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/asymmetric-effort/NogginLessDom/commit/25a3cbac665fae5663f8b71c073b80c3152dbe7b","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/asymmetric-effort/NogginLessDom","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x4hg-hfwf-p9mw","url":"https://github.com/advisories/GHSA-x4hg-hfwf-p9mw","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:53.053Z"}],"updatedAt":"2026-11-25T22:56:46.963Z"}