CVE-2026-25128: fast-xml-parser Denial of Service Vulnerability Due to RangeError in Numeric Entities

fast-xml-parser Updated 30 Jan 2026

Summary

30/01/2026
Yes i
High
7.5

CVE-2026-25128: fast-xml-parser has RangeError DoS Numeric Entities Bug. Affects fast-xml-parser versions >= 4.3.6, < 5.3.4. Fixed in 5.3.4. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

fast-xml-parser is a popular XML parsing library for Node.js that allows developers to easily convert XML data into JavaScript objects. It is widely used for processing XML payloads in various applications, including API servers, file processors, and message queues. However, the library has a vulnerability that can lead to a Denial of Service (DoS) when handling malformed numeric entities in XML input.

Vulnerability Detail

A RangeError vulnerability exists in the numeric entity processing of fast-xml-parser when parsing XML with out-of-range entity code points (e.g., '�' or '�'). This issue arises from the use of the String.fromCodePoint() method, which throws a RangeError when the code point exceeds the valid Unicode range (0 to 0x10FFFF). The regex patterns used in the parser can capture values far exceeding this range, leading to an uncaught exception that crashes the application. This vulnerability affects any application using fast-xml-parser to process untrusted XML input, resulting in potential service disruption.

How To Fix

Latest published version: 5.11.2 as of 23 Oct 2026

npm install fast-xml-parser@5.11.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.3.4

This is the first release that contains the fix.

npm install fast-xml-parser@5.3.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can implement a try-catch block around the parsing logic to handle potential RangeErrors gracefully. Here is an example of how to modify your server.js file:

const http = require('http');
const { XMLParser } = require('fast-xml-parser');

const parser = new XMLParser({ processEntities: true, htmlEntities: true });

http.createServer((req, res) => {
  if (req.method === 'POST' && req.url === '/parse') {
    let body = '';
    req.on('data', c => body += c);
    req.on('end', () => {
  try {
        const result = parser.parse(body);
        res.end(JSON.stringify(result));
      } catch (error) {
        res.statusCode = 400;
        res.end('Invalid XML input');
      }
    });
  } else {
    res.end('POST /parse with XML body');
  }
}).listen(3000, () => console.log('http://localhost:3000'));

Conclusion

The fast-xml-parser library has a critical vulnerability that can lead to Denial of Service when processing malformed numeric entities in XML input. It is essential to update to the patched version to mitigate this risk. Implementing a try-catch block can serve as a temporary workaround while you update the library.

See every vulnerability recorded for fast-xml-parser →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.

Any application using fast-xml-parser to process untrusted XML input is affected, including API servers, file processors, and RSS feed parsers.

If your application encounters this vulnerability, it may crash due to an uncaught RangeError when processing malformed numeric entities.

Yes, a patch is available in version 5.3.4 and later of the fast-xml-parser package.

Related vulnerabilities

Recent vulnerabilities recorded for fast-xml-parser.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 5.11.2 as of 23 Oct 2026

npm install fast-xml-parser@5.11.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5.3.4

This is the first release that contains the fix.

npm install fast-xml-parser@5.3.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback