Advisory

GHSA-x4hg-hfwf-p9mw

Also known as: None

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)

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-07-02 20:20 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

@asymmetric-effort/nogginlessdom

npm · All systems

Affected

  • introduced 0, fixed 0.0.22 (semver)

Fixed versions

0.0.22

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences