highVulnerability

CVE-2026-83616

## Summary `Document.createProcessingInstruction()` in `@xmldom/xmldom` performs no validation on the `target` parameter. The `requireWellFormed: true` serializer option validates only for `:` in the target and a case-insensitive `xml` prefix, but does not check for `>` characters. A `>` in the target breaks the processing instruction boundary (`<?...?>`), allowing injection of arbitrary content into the serialized XML output. ## Details `Document.createProcessingInstruction(target, data)` at `lib/dom.js` around line 2413 accepts any string as the `target` parameter and stores it on the PI node without validation. During serialization, the `requireWellFormed` code path (around line 3286) performs two checks on PI targets: 1. Rejects targets containing `:` (namespace prefix check) 2. Rejects targets matching `xml` case-insensitively (reserved prefix) However, it does NOT validate that the target conforms to the XML Name production, and critically does NOT check for `>` characters. Since processing instructions are serialized as `<?target data?>`, a `>` in the target prematurely closes the PI, causing the remaining content to be interpreted as document content by any downstream XML parser. ### Root Cause 1. `createProcessingInstruction()` performs no validation on `target` 2. The serializer's `requireWellFormed` check is incomplete -- it only checks for `:` and `xml`, missing characters that break PI syntax (`>`, `?`, whitespace) 3. The serializer emits the target verbatim: `<?${target} ${data}?>` ## Proof of Concept ```javascript const { DOMImplementation, XMLSerializer } = require('@xmldom/xmldom'); const impl = new DOMImplementation(); const serializer = new XMLSerializer(); const doc = impl.createDocument(null, 'root', null); // PI target containing > breaks the PI boundary const pi = doc.createProcessingInstruction('a>', 'data'); doc.documentElement.appendChild(pi); const output = serializer.serializeToString(doc, { requireWellFormed: true }); consol

Properties

ghsa_id
GHSA-c7q8-3ch8-vqpv
summary
xmldom: Processing Instruction Target Injection Bypasses requireWellFormed
severity
high
epss_score
0.00348
cve_id
CVE-2026-83616
is_ghsa_only
false
ghsa_published
2026-09-08T21:03:28Z
source_url
https://github.com/advisories/GHSA-c7q8-3ch8-vqpv
epss_percentile
0.27756
ghsa_updated
2026-09-08T21:03:31Z

Related Entities (7)

ENRICHED_BY (1)

[Source]FIRST EPSS

HAS_WEAKNESS (1)

[Weakness]XML Injection (aka Blind XPath Injection)

REPORTED_BY (1)

[Source]GitHub Advisory Database

AFFECTS (2)

[Software]npm/xmldom
[Software]npm/@xmldom/xmldom

VULNERABLE_TO (2)

[Software]npm/xmldom
[Software]npm/@xmldom/xmldom

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-83616 — Ninja Signal Threat Intelligence | Ninja Signal