CVE-2026-41650

fast-xml-parser XMLBuilder: XML Comment and CDATA Injection via Unescaped Delimiters

Published May 7, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
fast-xml-parser allows users to process XML from JS object without C/C++ based libraries or callbacks. Prior to version 5.7.0, XMLBuilder does not escape the "-->" sequence in comment content or the "]]>" 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. This issue has been patched in version 5.7.0.

Analysis

AI-generated

Technical impact

XMLBuilder in fast-xml-parser does not escape certain delimiter sequences (e.g., the comment end marker '-->' and the CDATA end marker ']]>') when constructing XML from JavaScript objects. This missing sanitization creates an injection point that attackers can exploit with user‑controlled data to place arbitrary XML content. The impact includes cross‑site scripting, SOAP envelope alteration, and other forms of data manipulation, a classic example of XML Injection (CWE‑91).

Affected Systems

All deployments of NaturalIntelligence's fast‑xml‑parser prior to version 5.7.0 are affected. The vulnerability exists in the XMLBuilder module that builds XML from JavaScript objects. Any system that imports or uses fast‑xml‑parser before the patch may be compromised if it processes untrusted input.

Risk and Exploitability

The CVSS score of 6.1 indicates a moderate severity with potential for significant impact. The EPSS score is not available, so the likelihood of exploitation cannot be quantified precisely, but the vulnerability is not listed in the CISA KEV catalog. Attackers can inject malicious content by providing crafted input that reaches XMLBuilder. The required conditions are that the application builds XML from untrusted data; based on the description, it is inferred that no additional authentication or sandboxing is required, implying a relatively straightforward exploitation path.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade fast‑xml‑parser to version 5.7.0 or later to restore proper escaping of comment and CDATA delimiters
  • Implement input validation that removes or escapes the --> and ]]> sequences from comment and CDATA contents before passing data to XMLBuilder
  • Restrict the source of data passed to XMLBuilder to trusted inputs wherever possible, such as whitelisting or sanitizing external data before parsing

Generated by OpenCVE AI on May 7, 2026 at 16:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-gh4j-gqv2-49f6 fast-xml-parser XMLBuilder: XML Comment and CDATA Injection via Unescaped Delimiters
History
Type Values Removed Values Added
CPEs cpe:2.3:a:naturalintelligence:fast-xml-parser:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Naturalintelligence
Naturalintelligence fast-xml-parser
Vendors & Products Naturalintelligence
Naturalintelligence fast-xml-parser
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description fast-xml-parser allows users to process XML from JS object without C/C++ based libraries or callbacks. Prior to version 5.7.0, XMLBuilder does not escape the "-->" sequence in comment content or the "]]>" 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. This issue has been patched in version 5.7.0.
Title fast-xml-parser XMLBuilder: XML Comment and CDATA Injection via Unescaped Delimiters
Weaknesses CWE-91
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-91

    XML Injection (aka Blind XPath Injection)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 7, 2026, 3:08 PM
Reserved
Apr 21, 2026, 11:58 PM
Status
Analyzed
Published
May 7, 2026, 3:16 PM
Modified
Oct 26, 2026, 8:10 PM
Severity
Moderate
Public date
May 7, 2026, 1:36 PM