<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Sat, 03 Oct 2026 09:49:44 +0000</lastBuildDate>
    <item>
      <title>GHSA-gh4j-gqv2-49f6 — fast-xml-parser XMLBuilder: XML Comment and CDATA Injection via Unescaped Delimiters</title>
      <link>https://db.gcve.eu/vuln/ghsa-gh4j-gqv2-49f6</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: fast-xml-parser&lt;/p&gt;
&lt;p&gt;# fast-xml-parser XMLBuilder: Comment and CDATA Injection via Unescaped Delimiters&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;fast-xml-parser XMLBuilder does not escape the `--&amp;gt;` sequence in comment content or the `]]&amp;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.&lt;/p&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;p&gt;This finding covers **unescaped comment/CDATA delimiters in XMLBuilder** - a distinct vulnerability.&lt;/p&gt;
&lt;p&gt;## Vulnerable Code&lt;/p&gt;
&lt;p&gt;**File**: `src/fxb.js`&lt;/p&gt;
&lt;p&gt;```javascript
// Line 442 - Comment building with NO escaping of --&amp;gt;
buildTextValNode(val, key, attrStr, level) {
    // ...
    if (key === this.options.commentPropName) {
        return this.indentate(level) + `&amp;lt;!--${val}--&amp;gt;` + this.newLine;  // VULNERABLE
    }
    // ...
    if (key === this.options.cdataPropName) {
        return this.indentate(level) + `&amp;lt;![CDATA[${val}]]&amp;gt;` + this.newLine;  // VULNERABLE
    }
}
```&lt;/p&gt;
&lt;p&gt;Compare with attribute/text escaping which IS properly handled via `replaceEntitiesValue()`.&lt;/p&gt;
&lt;p&gt;## Proof of Concept&lt;/p&gt;
&lt;p&gt;### Test 1: Comment Injection (XSS in SVG/HTML context)&lt;/p&gt;
&lt;p&gt;```javascript
import { XMLBuilder } from &amp;#39;fast-xml-parser&amp;#39;;&lt;/p&gt;
&lt;p&gt;const builde…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; npm: fast-xml-parser&lt;/p&gt;
&lt;p&gt;# fast-xml-parser XMLBuilder: Comment and CDATA Injection via Unescaped Delimiters&lt;/p&gt;
&lt;p&gt;## Summary&lt;/p&gt;
&lt;p&gt;fast-xml-parser XMLBuilder does not escape the `--&amp;gt;` sequence in comment content or the `]]&amp;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.&lt;/p&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;p&gt;This finding covers **unescaped comment/CDATA delimiters in XMLBuilder** - a distinct vulnerability.&lt;/p&gt;
&lt;p&gt;## Vulnerable Code&lt;/p&gt;
&lt;p&gt;**File**: `src/fxb.js`&lt;/p&gt;
&lt;p&gt;```javascript
// Line 442 - Comment building with NO escaping of --&amp;gt;
buildTextValNode(val, key, attrStr, level) {
    // ...
    if (key === this.options.commentPropName) {
        return this.indentate(level) + `&amp;lt;!--${val}--&amp;gt;` + this.newLine;  // VULNERABLE
    }
    // ...
    if (key === this.options.cdataPropName) {
        return this.indentate(level) + `&amp;lt;![CDATA[${val}]]&amp;gt;` + this.newLine;  // VULNERABLE
    }
}
```&lt;/p&gt;
&lt;p&gt;Compare with attribute/text escaping which IS properly handled via `replaceEntitiesValue()`.&lt;/p&gt;
&lt;p&gt;## Proof of Concept&lt;/p&gt;
&lt;p&gt;### Test 1: Comment Injection (XSS in SVG/HTML context)&lt;/p&gt;
&lt;p&gt;```javascript
import { XMLBuilder } from &amp;#39;fast-xml-parser&amp;#39;;&lt;/p&gt;
&lt;p&gt;const builde…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-gh4j-gqv2-49f6</guid>
    </item>
  </channel>
</rss>
