CVE-2026-12590
Analyzed Analyzed - Analysis Complete

Denial of Service in body-parser Due to Invalid Limit Handling

Vulnerability report for CVE-2026-12590, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-09

Last updated on: 2026-07-10

Assigner: openjs

Description

Impact: In body-parser versions prior to 1.20.6 (1.x line) and 2.3.0 (2.x line), when the 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. Patches: This issue is fixed in body-parser 1.20.6 and 2.3.0. After the fix, invalid limit values throw a clear error at parser construction time instead of silently disabling enforcement, while null and undefined continue to fall back to the default limit of 100kb. Workarounds: Validate the limit value before passing it to body-parser. For example, parse the value at startup and reject any configuration where the result is null or a non-finite number.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-09
Last Modified
2026-07-10
Generated
2026-07-16
AI Q&A
2026-07-09
EPSS Evaluated
2026-07-14
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
openjsf body-parser to 1.20.6 (exc)
openjsf body-parser From 2.0.0 (inc) to 2.3.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-770 The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-12590 affects the body-parser npm package and occurs when the parser is configured with an invalid limit option value such as an unparseable string or NaN. In affected versions, this causes bytes.parse() to return null, which silently disables the request body size check.

As a result, applications relying on the limit option to prevent oversized request bodies will accept arbitrarily large payloads. This can lead to excessive memory and CPU usage, causing a denial of service (DoS).

The vulnerability impacts body-parser versions prior to 1.20.6 (1.x line) and prior to 2.3.0 (2.x line). It has been fixed by making invalid limit values throw a clear error during parser construction instead of silently disabling enforcement.

Impact Analysis

This vulnerability can lead to denial of service (DoS) attacks by allowing attackers to send arbitrarily large request bodies to applications using vulnerable versions of body-parser.

Because the size check is silently skipped when an invalid limit is set, the application may consume excessive memory and CPU resources, potentially causing it to become unresponsive or crash.

Detection Guidance

This vulnerability occurs when the body-parser package is configured with an invalid limit option value such as an unparseable string or NaN, causing the size check to be skipped silently.

To detect this vulnerability on your system, you should check the version of the body-parser package in use and verify the configuration of the limit option.

  • Run a command to check the installed version of body-parser, for example: npm list body-parser
  • Inspect your application configuration files or code to find the limit option passed to body-parser and verify if it is a valid, parseable value.
  • You can add logging or debugging around the body-parser initialization to detect if an invalid limit value is being used.
Mitigation Strategies

To mitigate this vulnerability, immediately upgrade body-parser to version 1.20.6 or later if you are using the 1.x line, or to version 2.3.0 or later if you are using the 2.x line.

Additionally, validate the limit option value before passing it to body-parser to ensure it is a valid, finite number.

  • Parse the limit value at application startup using bytes.parse() or equivalent and reject any configuration where the result is null or non-finite.
  • If upgrading immediately is not possible, implement validation checks on the limit configuration to prevent invalid values from disabling size enforcement.
Compliance Impact

This vulnerability in body-parser allows denial of service (DoS) attacks by accepting arbitrarily large payloads when an invalid limit value is configured. While the impact is limited to availability (excessive memory and CPU usage), it does not directly involve data confidentiality or integrity.

Because the vulnerability primarily affects availability and does not expose or compromise personal data, it does not directly violate compliance requirements of standards like GDPR or HIPAA, which focus on data protection and privacy.

However, denial of service incidents can indirectly impact compliance by causing service outages or disruptions, which may affect availability requirements under these regulations.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-12590. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart