Summary
@asymmetric-effort/nogginlessdom vulnerable to ReDoS via user-controlled regex in HTMLInputElement pattern validation
The 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.
Impact
A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use. Typical impact: denial of service when input is crafted to trigger backtracking.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Fixed in commit https://github.com/asymmetric-effort/NogginLessDom/commit/25a3cbac665fae5663f8b71c073b80c3152dbe7b on main. Added:
- Pattern length limit (1024 characters)
- Nested quantifier detection (
hasNestedQuantifiers) that rejects patterns like(a+)+before constructing the regex - Patterns exceeding limits are treated as non-matching (safe default)
Frequently Asked Questions
- What is GHSA-X4HG-HFWF-P9MW? GHSA-X4HG-HFWF-P9MW is a medium-severity inefficient regular expression (ReDoS) vulnerability in @asymmetric-effort/nogginlessdom (npm), affecting versions <= 0.0.21. It is fixed in 0.0.22. A regular expression with worst-case exponential or polynomial matching time is applied to untrusted input, causing excessive CPU use.
- Which versions of @asymmetric-effort/nogginlessdom are affected by GHSA-X4HG-HFWF-P9MW? @asymmetric-effort/nogginlessdom (npm) versions <= 0.0.21 is affected.
- Is there a fix for GHSA-X4HG-HFWF-P9MW? Yes. GHSA-X4HG-HFWF-P9MW is fixed in 0.0.22. Upgrade to this version or later.
- Is GHSA-X4HG-HFWF-P9MW exploitable, and should I be worried? Whether GHSA-X4HG-HFWF-P9MW is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-X4HG-HFWF-P9MW is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-X4HG-HFWF-P9MW? Upgrade
@asymmetric-effort/nogginlessdomto 0.0.22 or later.