CVE-2026-27942: fast-xml-parser has stack overflow in XMLBuilder with preserveOrder
fast-xml-parser allows users to validate XML, parse XML to JS object, or build XML from JS object without C/C++ based libraries and no callback. Prior to version 5.3.8, the application crashes with stack overflow when user use XML builder with `preserveOrder:true`. Version 5.3.8 fixes the issue. As a workaround, use XML builder with `preserveOrder:false` or check the input data before passing to builder.
Security readout for executives and security teams
Plain-English summary
This is a low-severity denial-of-service issue in fast-xml-parser. Affected versions can crash with a stack overflow when XMLBuilder is used with preserveOrder:true. Business urgency is limited unless an externally reachable workflow builds XML from untrusted or poorly bounded input.
Executive priority
Handle in normal dependency maintenance unless the vulnerable builder path is externally reachable. Escalate only for services where malformed input could repeatedly crash production processes.
Technical view
fast-xml-parser before 5.3.8 can stack overflow in XMLBuilder when preserveOrder:true is enabled. The published CVSS 4.0 score is 2.7 with low availability impact and no stated confidentiality or integrity impact. Version 5.3.8 contains the fix.
Likely exposure
Exposure is most likely in Node.js applications using fast-xml-parser below 5.3.8, specifically XMLBuilder with preserveOrder:true. Risk increases where builder input is influenced by users, APIs, queues, or partner integrations.
Exploitation context
The bundle does not show CISA KEV listing or active exploitation evidence. The issue is a crash condition, not data theft or code execution based on the provided sources.
Researcher notes
The affected surface is XML building, not general XML parsing. Evidence in the bundle names a fixed version and workarounds, but does not provide proof of exploitation in the wild.
Mitigation direction
Upgrade fast-xml-parser to version 5.3.8 or later.
If upgrade is delayed, use XMLBuilder with preserveOrder:false.
Check or constrain input data before passing it to XMLBuilder.
Prioritize internet-facing or partner-facing XML generation paths.
Validation and detection
Inventory applications depending on fast-xml-parser below 5.3.8.
Review code for XMLBuilder configured with preserveOrder:true.
Identify whether builder input can come from untrusted sources.
Confirm deployed packages resolve to version 5.3.8 or later.
Run regression tests for XML output after changing preserveOrder settings.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-120: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-120 · source CWE mapping
Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.