Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-27942: CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') in NaturalIntelligence fast-xml-parser

0
Low
VulnerabilityCVE-2026-27942cvecve-2026-27942cwe-120
Published: Thu Feb 26 2026 (02/26/2026, 01:22:11 UTC)
Source: CVE Database V5
Vendor/Project: NaturalIntelligence
Product: fast-xml-parser

Description

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/05/2026, 11:17:38 UTC

Technical Analysis

The vulnerability identified as CVE-2026-27942 affects the fast-xml-parser library developed by NaturalIntelligence, specifically versions prior to 5.3.8. This library is widely used in JavaScript environments to parse XML data into JavaScript objects and to build XML from JavaScript objects without relying on C/C++ libraries or callbacks. The vulnerability is a classic buffer overflow (CWE-120) that manifests when the XML builder is used with the 'preserveOrder:true' option. Under these conditions, the application can crash due to a stack overflow caused by unchecked buffer copying during XML building. The flaw arises because the library does not properly check the size of input data before copying it into a buffer, leading to memory corruption and application instability. The vulnerability can be triggered remotely by supplying crafted XML input to the affected XML builder functionality. The issue was resolved in version 5.3.8 of fast-xml-parser. No known exploits have been reported in the wild, and the CVSS v4.0 score is 2.7, reflecting a low severity primarily due to the limited impact scope and lack of authentication or user interaction requirements. The vulnerability primarily results in denial of service through application crashes rather than remote code execution or data compromise.

Potential Impact

The primary impact of CVE-2026-27942 is denial of service (DoS) caused by application crashes due to stack overflow when processing XML with the vulnerable fast-xml-parser versions. Organizations relying on this library for XML processing in web applications, APIs, or backend services may experience service interruptions or degraded availability if an attacker supplies malicious XML input with the 'preserveOrder:true' option enabled. Although the vulnerability does not lead to remote code execution or data leakage, the resulting instability can disrupt business operations, especially in environments where XML parsing is critical. The low CVSS score reflects the limited confidentiality and integrity impact, but availability impact may be significant in high-availability or real-time systems. Since no authentication or user interaction is required, attackers can exploit this vulnerability remotely if the affected XML builder functionality is exposed to untrusted input. This risk is heightened in public-facing services or microservices architectures that parse XML from external sources.

Mitigation Recommendations

To mitigate CVE-2026-27942, organizations should upgrade fast-xml-parser to version 5.3.8 or later, where the vulnerability is fixed. If immediate upgrading is not feasible, the following specific mitigations are recommended: (1) Disable the 'preserveOrder' option in the XML builder by setting it to false, as this prevents the vulnerable code path from being executed. (2) Implement strict input validation and sanitization on all XML data before passing it to the fast-xml-parser builder, ensuring that input size and structure conform to expected parameters to avoid triggering buffer overflows. (3) Employ runtime protections such as application-level sandboxing or memory safety tools to detect and prevent stack overflows. (4) Monitor application logs and crash reports for signs of stack overflow or abnormal termination related to XML processing. (5) Restrict access to XML processing endpoints to trusted sources where possible, reducing exposure to crafted malicious input. (6) Incorporate fuzz testing and static code analysis in the development lifecycle to detect similar vulnerabilities proactively.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-25T03:11:36.689Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 699fabd8b7ef31ef0b7dea09

Added to database: 2/26/2026, 2:11:36 AM

Last enriched: 3/5/2026, 11:17:38 AM

Last updated: 4/12/2026, 3:03:20 AM

Views: 114

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses