Denial of Service Vulnerability in Node Body Parser Package

node-body-parser Updated 02 Oct 2025

Summary

10/09/2024
N/A
Yes i
Unrated
Not published

DEBIAN-CVE-2024-45590: body-parser is Node.js body parsing middleware. body-parser. Affects node-body-parser versions < 1.20.3+~1.19.5-1. Fixed in 1.20.3+~1.19.5-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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Node Body Parser is a middleware for Node.js that simplifies the process of parsing incoming request bodies in a middleware before your handlers, available under the 'body-parser' package. It is widely used in web applications to handle various content types, including JSON and URL-encoded data. However, versions prior to 1.20.3 are susceptible to a denial of service (DoS) attack when URL encoding is enabled, making it critical for users to be aware of this vulnerability.

Vulnerability Detail

The vulnerability arises from the way body-parser handles URL-encoded data. Specifically, versions before 1.20.3 can be exploited by a malicious actor who sends a specially crafted payload that floods the server with a large number of requests. This can lead to a denial of service, where legitimate users are unable to access the service due to overwhelming traffic caused by the attack. The issue has been identified and patched in version 1.20.3.

How To Fix

Minimum fixed version

1.20.3+~1.19.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-body-parser

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

Workaround

If you cannot immediately update the package, consider implementing rate limiting on your server to mitigate the impact of potential DoS attacks. This can be done using middleware such as 'express-rate-limit' in your Node.js application.

Conclusion

In summary, the body-parser package has a critical vulnerability that can lead to denial of service attacks in versions prior to 1.20.3. It is essential to update to the latest version to protect your application. Additionally, implementing rate limiting can serve as a temporary measure to mitigate risks until the update is applied.

See every vulnerability recorded for node-body-parser →

Share this vulnerability

FAQ

The body-parser package is middleware for Node.js that helps parse incoming request bodies, making it easier to handle different content types in web applications.

The vulnerability can allow attackers to overwhelm your server with requests, leading to a denial of service where legitimate users cannot access your application.

Versions of body-parser prior to 1.20.3 are vulnerable to this denial of service attack.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.

If an immediate update is not possible, consider implementing rate limiting on your server to help mitigate the risk of denial of service attacks.

Related vulnerabilities

Recent vulnerabilities recorded for node-body-parser.

How To Fix

Minimum fixed version

1.20.3+~1.19.5-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade node-body-parser

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