All vulnerabilities

npm

CVE-2026-12590

body-parser vulnerable to denial of service when invalid limit value silently disables size enforcement

Severity
Low 3.7
Published
20 Jul 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.20.6, 2.3.0
Exploit chance
0.4% in the next 30 daysHigher than 36% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Allocation without limits (CWE-770)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Slow it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
Also known as
GHSA-v422-hmwv-36x6
Sources
OSV.dev and GitHub

Description

When body-parser is configured with an invalid limit option value, such as an unparseable string or NaN, bytes.parse() returns null and the request body size check is silently skipped. Applications that rely on limit as their primary safeguard against oversized request bodies will accept arbitrarily large payloads, leading to excessive memory and CPU usage and denial of service.

This issue affects applications that pass a programmatically computed or user-configurable value to the limit option without validating it first.

From the GitHub Advisory Database, CC BY 4.0.

Workarounds

Validate limit before passing it to body-parser. For example, parse the value with bytes.parse() at startup and reject any configuration where it returns null or a non-finite number.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
body-parsernpm · osv:npm:body-parser
  • Every version before 1.20.6
  • From 2.0.0 before 2.3.0

About body-parser

Weekly downloads (npm)
201,776,539npm, 15 Nov 2026

Vulnerabilities in body-parser

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
1
Known exploited
0
Search the list for body-parser

References