<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://db.gcve.eu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-03T09:49:43.948715+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@gcve.eu</email>
  </author>
  <link href="https://db.gcve.eu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://db.gcve.eu/vuln/ghsa-gh4j-gqv2-49f6</id>
    <title>GHSA-gh4j-gqv2-49f6 — fast-xml-parser XMLBuilder: XML Comment and CDATA Injection via Unescaped Delimiters</title>
    <updated>2026-10-03T09:49:43.959017+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> npm: fast-xml-parser</p>
<p># fast-xml-parser XMLBuilder: Comment and CDATA Injection via Unescaped Delimiters</p>
<p>## Summary</p>
<p>fast-xml-parser XMLBuilder does not escape the `--&gt;` sequence in comment content or the `]]&gt;` sequence in CDATA sections when building XML from JavaScript objects. This allows XML injection when user-controlled data flows into comments or CDATA elements, leading to XSS, SOAP injection, or data manipulation.</p>
<p>Existing CVEs for fast-xml-parser cover different issues:
- CVE-2023-26920: Prototype pollution (parser)
- CVE-2023-34104: ReDoS (parser)
- CVE-2026-27942: Stack overflow in XMLBuilder with preserveOrder
- CVE-2026-25896: Entity encoding bypass via regex in DOCTYPE entities</p>
<p>This finding covers **unescaped comment/CDATA delimiters in XMLBuilder** - a distinct vulnerability.</p>
<p>## Vulnerable Code</p>
<p>**File**: `src/fxb.js`</p>
<p>```javascript
// Line 442 - Comment building with NO escaping of --&gt;
buildTextValNode(val, key, attrStr, level) {
    // ...
    if (key === this.options.commentPropName) {
        return this.indentate(level) + `&lt;!--${val}--&gt;` + this.newLine;  // VULNERABLE
    }
    // ...
    if (key === this.options.cdataPropName) {
        return this.indentate(level) + `&lt;![CDATA[${val}]]&gt;` + this.newLine;  // VULNERABLE
    }
}
```</p>
<p>Compare with attribute/text escaping which IS properly handled via `replaceEntitiesValue()`.</p>
<p>## Proof of Concept</p>
<p>### Test 1: Comment Injection (XSS in SVG/HTML context)</p>
<p>```javascript
import { XMLBuilder } from 'fast-xml-parser';</p>
<p>const builde…</p></div>
    </content>
    <link href="https://db.gcve.eu/vuln/ghsa-gh4j-gqv2-49f6"/>
  </entry>
</feed>
