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-25896: CWE-185: Incorrect Regular Expression in NaturalIntelligence fast-xml-parser

0
Critical
VulnerabilityCVE-2026-25896cvecve-2026-25896cwe-185
Published: Fri Feb 20 2026 (02/20/2026, 20:57:48 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. From 4.1.3to before 5.3.5, a dot (.) in a DOCTYPE entity name is treated as a regex wildcard during entity replacement, allowing an attacker to shadow built-in XML entities (<, >, &, ", ') with arbitrary values. This bypasses entity encoding and leads to XSS when parsed output is rendered. This vulnerability is fixed in 5.3.5.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/07/2026, 21:22:45 UTC

Technical Analysis

The vulnerability identified as CVE-2026-25896 affects the fast-xml-parser library developed by NaturalIntelligence, which is widely used to validate, parse, and build XML data in JavaScript environments without relying on native C/C++ libraries or callbacks. The core issue stems from the library's handling of DOCTYPE entity names containing a dot ('.'). Instead of treating the dot as a literal character, the parser interprets it as a regex wildcard during entity replacement. This behavior enables an attacker to shadow or override the built-in XML entities such as <, >, &, ", and ' with arbitrary values. Consequently, the entity encoding intended to prevent injection attacks is bypassed. When the XML is parsed and the output is rendered in a web context, this can lead to cross-site scripting (XSS) vulnerabilities, allowing attackers to execute malicious scripts in the victim's browser. The vulnerability affects fast-xml-parser versions from 4.1.3 up to but not including 4.5.4, and from 5.0.0 up to but not including 5.3.5. The issue does not require any privileges or user interaction to exploit, and the scope is complete as it affects all users of the vulnerable versions. The CVSS v3.1 base score is 9.3 (critical), reflecting the network attack vector, low attack complexity, no privileges required, no user interaction, and a scope change with high impact on integrity and partial impact on confidentiality. No known exploits are currently reported in the wild, but the severity and ease of exploitation make it a significant threat. The vulnerability is addressed in version 5.3.5 of fast-xml-parser.

Potential Impact

This vulnerability poses a severe risk to organizations that use the fast-xml-parser library for XML processing in web applications or services. Successful exploitation can lead to cross-site scripting (XSS) attacks, which may allow attackers to execute arbitrary JavaScript in the context of the victim's browser. This can result in session hijacking, credential theft, unauthorized actions on behalf of users, and distribution of malware. Since the vulnerability bypasses entity encoding, it undermines fundamental security assumptions in XML parsing and rendering workflows. The impact extends to any system that processes untrusted XML input and subsequently renders the parsed output in a web interface. Given the widespread use of fast-xml-parser in JavaScript projects, including server-side Node.js applications and client-side tools, the potential attack surface is broad. Organizations handling sensitive data, financial transactions, or critical infrastructure are particularly at risk. The vulnerability does not affect availability but compromises integrity and confidentiality, potentially leading to data breaches and reputational damage.

Mitigation Recommendations

The primary mitigation is to upgrade the fast-xml-parser library to version 5.3.5 or later, where the issue is fixed. Organizations should audit their codebases and dependencies to identify usage of affected versions and prioritize patching. For environments where immediate upgrade is not feasible, implement strict input validation and sanitization on XML data before parsing, focusing on disallowing or escaping DOCTYPE declarations and entity definitions. Employ Content Security Policy (CSP) headers to restrict the execution of inline scripts and reduce the impact of potential XSS. Additionally, consider using alternative XML parsing libraries that do not exhibit this vulnerability or that have undergone thorough security review. Monitor application logs and web traffic for unusual patterns indicative of attempted exploitation. Finally, educate developers about secure XML handling practices and the risks of improper entity processing.

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-06T21:08:39.130Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6998cf5abe58cf853bb24fa1

Added to database: 2/20/2026, 9:17:14 PM

Last enriched: 3/7/2026, 9:22:45 PM

Last updated: 4/7/2026, 6:49:34 AM

Views: 906

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