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

AILast updated: 02/20/2026, 21:31:49 UTC

Technical Analysis

The vulnerability CVE-2026-25896 affects the fast-xml-parser library, a popular JavaScript tool used for validating XML, parsing XML into JavaScript objects, and building XML from JavaScript objects without relying on C/C++ libraries or callbacks. In versions from 4.1.3 up to but not including 5.3.5, the parser incorrectly treats a dot (.) in a DOCTYPE entity name as a regex wildcard during the process of entity replacement. This behavior enables an attacker to shadow or override the standard XML entities (<, >, &, ", ') with arbitrary values. Since these entities are fundamental for encoding special characters in XML to prevent injection attacks, their replacement with attacker-controlled values effectively bypasses entity encoding protections. When the parsed XML output is subsequently rendered in an application, this can lead to cross-site scripting (XSS), allowing attackers to execute arbitrary scripts in the context of the victim’s browser. The vulnerability does not require any privileges or user interaction, making it remotely exploitable over the network. The scope of impact is broad because fast-xml-parser is widely used in web applications and services that handle XML data. The issue was publicly disclosed in February 2026 and has a CVSS v3.1 score of 9.3, indicating critical severity. The vulnerability is categorized under CWE-185 (Incorrect Regular Expression), highlighting the root cause as improper regex handling in the parser’s entity replacement logic. The vulnerability is fixed in version 5.3.5 of fast-xml-parser, and users are strongly advised to upgrade to this or later versions.

Potential Impact

This vulnerability can have severe consequences for organizations worldwide that use fast-xml-parser in their web applications or services. By exploiting this flaw, attackers can inject malicious scripts via crafted XML inputs, leading to cross-site scripting (XSS) attacks. Such attacks can compromise user confidentiality by stealing session tokens, credentials, or personal data. They can also affect data integrity by manipulating displayed content or executing unauthorized actions on behalf of users. The vulnerability does not impact availability directly but can facilitate further attacks that degrade service. Since no authentication or user interaction is required, attackers can exploit this remotely and at scale, potentially affecting a large number of users. Organizations relying on fast-xml-parser for XML processing in client-side or server-side JavaScript environments are at risk. This includes web applications, APIs, and microservices that parse XML data. The critical CVSS score reflects the high likelihood of exploitation and the significant impact on confidentiality and integrity. Failure to patch this vulnerability could lead to data breaches, reputational damage, regulatory penalties, and loss of user trust.

Mitigation Recommendations

The primary mitigation is to upgrade fast-xml-parser to version 5.3.5 or later, where the vulnerability 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 inputs to detect and reject malicious DOCTYPE declarations or entity definitions containing dots in entity names. Employ Content Security Policy (CSP) headers to reduce the impact of potential XSS by restricting script execution sources. Additionally, consider using alternative XML parsing libraries that do not exhibit this vulnerability if upgrading is delayed. Conduct thorough security testing, including fuzzing and penetration testing, focusing on XML input handling to detect similar weaknesses. Monitor application logs and network traffic for suspicious XML payloads that attempt to exploit entity replacement. Educate developers about secure XML parsing practices and the risks of improper entity handling. Finally, maintain an up-to-date inventory of third-party libraries and subscribe to vulnerability advisories to respond promptly to future issues.

Need more detailed analysis?Upgrade to Pro Console

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: 2/20/2026, 9:31:49 PM

Last updated: 2/21/2026, 1:30:13 AM

Views: 4

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 in Console -> Billing for AI refresh and higher limits.

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

Latest Threats