GHSA-x4hg-hfwf-p9mw

Suggest an improvement
Source
https://github.com/advisories/GHSA-x4hg-hfwf-p9mw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-x4hg-hfwf-p9mw/GHSA-x4hg-hfwf-p9mw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-x4hg-hfwf-p9mw
Published
2026-07-02T20:20:04Z
Modified
2026-09-10T03:50:53Z
Severity
  • 6.9 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
@asymmetric-effort/nogginlessdom vulnerable to ReDoS via user-controlled regex in HTMLInputElement pattern validation
Details

Summary

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.

Fix

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)
Database specific
{
    "cwe_ids":  [
        "CWE-1333"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-07-02T20:20:04Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

npm / @asymmetric-effort/nogginlessdom

Package

Name
@asymmetric-effort/nogginlessdom
View open source insights on deps.dev
Purl
pkg:npm/%40asymmetric-effort/nogginlessdom

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.0.22

Database specific

last_known_affected_version_range
"<= 0.0.21"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-x4hg-hfwf-p9mw/GHSA-x4hg-hfwf-p9mw.json"