CVE-2026-41650
Awaiting Analysis Awaiting Analysis - Queue
XML Injection in fast-xml-parser

Publication date: 2026-05-07

Last updated on: 2026-05-07

Assigner: GitHub, Inc.

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-07
Last Modified
2026-05-07
Generated
2026-05-07
AI Q&A
2026-05-07
EPSS Evaluated
N/A
NVD
Affected Vendors & Products
Showing 2 associated CPEs
Vendor Product Version / Range
naturalintelligence fast-xml-parser to 5.7.0 (exc)
naturalintelligence fast-xml-parser 5.5.12
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-91 The product does not properly neutralize special elements that are used in XML, allowing attackers to modify the syntax, content, or commands of the XML before it is processed by an end system.
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The vulnerability in fast-xml-parser allows XML injection through unescaped delimiters in comments and CDATA sections, which can lead to cross-site scripting (XSS), SOAP injection, or data manipulation.

Such security issues can potentially impact compliance with standards and regulations like GDPR and HIPAA, as these require protection of data integrity and confidentiality, and prevention of unauthorized data manipulation or disclosure.

If exploited, this vulnerability could lead to unauthorized data access or manipulation, which may violate data protection requirements under these regulations.

However, the provided information does not explicitly state the direct impact on compliance with these standards.


Can you explain this vulnerability to me?

CVE-2026-41650 is a vulnerability in the fast-xml-parser library, specifically in versions 5.5.12 and earlier. The issue arises because the XMLBuilder component does not properly escape certain sequences in XML comments and CDATA sections, namely the "-->" sequence in comments and the "]]>” sequence in CDATA. When user-controlled data is inserted into these parts of the XML, an attacker can inject malicious XML content.

This improper escaping allows for XML injection attacks, which can lead to cross-site scripting (XSS), SOAP message injection, or manipulation of data within XML-based formats such as RSS feeds.

The vulnerability has been fixed in version 5.7.0 by ensuring these sequences are properly escaped when building XML from JavaScript objects.


How can this vulnerability impact me? :

This vulnerability can impact you by allowing attackers to inject malicious content into XML documents generated by the fast-xml-parser library when user-controlled data is included in comments or CDATA sections.

  • Cross-site scripting (XSS) attacks, especially in contexts like SVG or HTML, which can lead to theft of user data or session hijacking.
  • SOAP message injection, potentially allowing attackers to manipulate SOAP-based web service communications.
  • RSS feed poisoning or other data manipulation attacks that rely on XML content.

The vulnerability is exploitable remotely over the network with low complexity and does not require privileges, but it does require user interaction.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability occurs when user-controlled data is inserted into XML comments or CDATA sections without proper escaping of the sequences "-->" and "]]>". Detection involves identifying XMLBuilder usage in your applications, especially versions 5.5.12 and earlier of fast-xml-parser.

To detect exploitation attempts or presence of the vulnerability, you can monitor XML data generated by your system for unescaped comment or CDATA delimiters that could indicate injection.

There are no specific commands provided in the resources for detection, but general approaches include:

  • Review your project's dependencies to check if fast-xml-parser version 5.5.12 or earlier is used.
  • Search your codebase for usage of XMLBuilder to see if user input flows into comments or CDATA sections.
  • Use network monitoring tools or log analysis to detect XML payloads containing unescaped "-->" or "]]>" sequences in comments or CDATA sections.

What immediate steps should I take to mitigate this vulnerability?

The primary mitigation step is to upgrade the fast-xml-parser library to version 5.7.0 or later, where the issue has been patched by properly escaping the problematic sequences in XML comments and CDATA sections.

If upgrading immediately is not possible, ensure that any user-controlled data inserted into XML comments or CDATA sections is sanitized or escaped to prevent injection.

Additionally, review your application to minimize or avoid placing untrusted input into XML comments or CDATA sections.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart