CVE-2025-13466: body-parser Denial of Service Vulnerability Due to Inefficient URL Encoding Handling

body-parser Updated 25 Nov 2025

Summary

25/11/2025
Yes i
Moderate
5.3

CVE-2025-13466: body-parser is vulnerable to denial of service when url encoding is used. Affects body-parser versions < 2.2.1. Fixed in 2.2.1. 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

body-parser is a middleware for Node.js that parses incoming request bodies in a middleware before your handlers, available under the req.body property. It supports various content types, including JSON and URL-encoded data. The package is widely used in web applications to handle form submissions and API requests. However, version 2.2.0 of body-parser is vulnerable to a denial of service (DoS) attack when handling URL-encoded bodies with a large number of parameters, which can lead to performance degradation and service outages.

Vulnerability Detail

The vulnerability arises from the inefficient handling of URL-encoded bodies that contain an excessive number of parameters. An attacker can exploit this by sending requests with thousands of parameters, exceeding the default request size limit of 100KB. This can cause elevated CPU and memory usage, leading to slowdowns or partial outages of the service under sustained malicious traffic. The vulnerability is classified under CWE-400, which pertains to the resource exhaustion.

How To Fix

Latest published version: 2.4.0 as of 22 Oct 2026

npm install body-parser@2.4.0

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

If you need the minimum change

2.2.1

This is the first release that contains the fix.

npm install body-parser@2.2.1

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

Workaround

As a temporary workaround, you can limit the number of parameters accepted in URL-encoded requests or implement rate limiting on your API endpoints to mitigate the impact of potential attacks. However, the best solution is to update to the patched version.

Conclusion

The body-parser package version 2.2.0 is vulnerable to a denial of service attack due to inefficient handling of URL-encoded bodies. It is crucial to update to version 2.2.1 or later to mitigate this risk. Additionally, using tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for body-parser →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.3, indicating a moderate severity level.

Version 2.2.0 of body-parser is affected. The vulnerability is fixed in version 2.2.1.

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

The potential impacts include service slowdowns and partial outages due to elevated CPU and memory usage when handling malicious requests.

Yes, you can implement rate limiting or restrict the number of parameters in requests as a temporary measure, but updating to the patched version is the best solution.

Related vulnerabilities

Recent vulnerabilities recorded for body-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: 2.4.0 as of 22 Oct 2026

npm install body-parser@2.4.0

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

If you need the minimum change

2.2.1

This is the first release that contains the fix.

npm install body-parser@2.2.1

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