CVE-2026-83619

xmldom: End-tag Whitespace-Trim Regex ReDoS — quadratic backtracking in the 0.8.x end-tag parser

Published Sep 1, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.7.0 until 0.8.15, the release-0.8.x parser in lib/sax.js trims captured end-tag names with the unanchored global expression /[ \t\n\r]+$/g. For an end tag containing a long whitespace run followed by a non-whitespace character, the expression retries from each possible starting position and backtracks quadratically before failing its end anchor. DOMParser.parseFromString() reaches the path under default options, allowing a small unauthenticated XML input to stall the Node.js event loop; the 0.9.x and unscoped npm lines do not contain this expression. This issue is fixed in @xmldom/xmldom version 0.8.15.

Analysis

AI-generated

Technical impact

The vulnerability is a Regular Expression Denial of Service flaw in the xmldom library, caused by an unanchored global regular expression that for an end tag containing a long sequence of whitespace followed by a non‑whitespace character retries from every position and backtracks quadratically. When DOMParser.parseFromString processes such input, the expression ultimately fails but has already exhausted the Node.js event loop, causing a stall. The result is a denial of service by halting application activity. The flaw is limited to a loss of availability; no confidentiality or integrity effects are described in the CVE statement.

Affected Systems

Packages of the xmldom npm library in the release‑0.8.x branch from version 0.7.0 through 0.8.14 inclusive are affected. Projects that depend on @xmldom/xmldom at any of these versions and invoke DOMParser.parseFromString with untrusted XML input are vulnerable. The 0.9.x series and the unscoped npm releases exclude the vulnerable regular expression and are not susceptible.

Risk and Exploitability

The CVSS base score of 8.7 reflects a high severity availability impact. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is the unauthenticated delivery of a malformed XML document to a process that uses the library’s DOMParser.parseFromString under default options; the attacker can then trigger the event‑loop stall by providing a crafted XML file that satisfies the problematic pattern. This stall can be exploited wherever the library is used to process external XML data.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade xmldom to version 0.8.15 or later.
  • If an upgrade cannot be performed immediately, wrap calls to DOMParser.parseFromString in a timeout or execute the parser in a sandboxed process to limit the duration of the event loop stall.
  • Audit the dependency tree for any other module that pulls in the vulnerable xmldom version and keep all dependencies up to date.

Generated by OpenCVE AI on September 1, 2026 at 17:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-x4fp-j954-r2f4 xmldom: End-tag Whitespace-Trim Regex ReDoS — quadratic backtracking in the 0.8.x end-tag parser
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Xmldom
Xmldom xmldom
Vendors & Products Xmldom
Xmldom xmldom
Type Values Removed Values Added
Description xmldom is a pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module. From 0.7.0 until 0.8.15, the release-0.8.x parser in lib/sax.js trims captured end-tag names with the unanchored global expression /[ \t\n\r]+$/g. For an end tag containing a long whitespace run followed by a non-whitespace character, the expression retries from each possible starting position and backtracks quadratically before failing its end anchor. DOMParser.parseFromString() reaches the path under default options, allowing a small unauthenticated XML input to stall the Node.js event loop; the 0.9.x and unscoped npm lines do not contain this expression. This issue is fixed in @xmldom/xmldom version 0.8.15.
Title xmldom: End-tag Whitespace-Trim Regex ReDoS — quadratic backtracking in the 0.8.x end-tag parser
Weaknesses CWE-1333
CWE-400
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity

  • CWE-400

    Uncontrolled Resource Consumption

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 1, 2026, 6:05 PM
Reserved
Aug 31, 2026, 8:36 PM
Status
Deferred
Published
Sep 1, 2026, 3:17 PM
Modified
Sep 8, 2026, 9:11 PM
Severity
Important
Public date
Sep 1, 2026, 2:51 PM