CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-12590

CVE-2026-12590: Fail-Open Limit Enforcement Vulnerability in body-parser

Amit Schendel
Amit Schendel
Senior Security Researcher

Jul 21, 2026·6 min read·53 visits

Executive Summary (TL;DR)

Unparseable limit configurations in the body-parser middleware fail open silently. Attackers can exploit this to send massive requests, exhausting server memory and crashing the Node.js process.

A vulnerability in the 'body-parser' Node.js middleware allows unauthenticated attackers to trigger a Denial of Service. When the 'limit' configuration option is misconfigured with an unparseable type or empty value, size limits fail open. This leads to unrestricted heap memory allocation and process crash via Out of Memory (OOM).

Vulnerability Overview

The open-source 'body-parser' module acts as request-parsing middleware for Node.js and is standard in Express-based applications. It parses incoming request bodies before they reach application route handlers, populating the 'req.body' property. Because this middleware handles incoming network streams, it exposes a critical attack surface that requires strict resource controls.

To prevent resource exhaustion, developers specify a 'limit' parameter to enforce maximum payload sizes. This limit restricts the buffer size allocated during request handling. Under standard operations, any request exceeding this configured limit is rejected with a 413 Payload Too Large HTTP response.

This security control depends on successful configuration parsing. When body-parser initializes with an invalid, unparseable, or empty 'limit' value, the validation fails open. Rather than stopping server execution or defaulting to a secure restriction, the middleware disables boundary checks, exposing the host to denial of service.

Root Cause Analysis

The root cause of this vulnerability lies in how configuration variables are normalized during middleware initialization. In affected versions of body-parser, the module delegates input evaluation to the 'bytes.parse()' utility library. If this library receives an unparseable string, boolean, empty string, or object, it returns 'null' instead of throwing an error.

Downstream verification logic does not validate whether the parsed output is a valid number before application execution. When the internal parser receives a request, it performs checks to evaluate the stream length against the limit configuration. If 'limit' resolves to 'null', the size check skips boundary enforcement and allows data streams of any size to be parsed.

If the configuration value resolves to 'NaN' (Not-a-Number), the comparison checks fail similarly. Every numerical comparison against 'NaN' evaluates to false. Consequently, comparisons designed to detect if a request length exceeds the limit resolve to false, allowing arbitrary size payloads to bypass memory allocation restrictions.

Code Analysis

In vulnerable versions (such as '1.20.5'), the initialization utility normalizes the input using the following logic:

// Vulnerable logic in body-parser <= 1.20.5
var limit = typeof opts.limit !== 'number'
  ? bytes.parse(opts.limit || '100kb')
  : opts.limit

If 'opts.limit' evaluates to an invalid type (such as an object or boolean), 'bytes.parse()' returns 'null'. The variable 'limit' becomes 'null', disabling subsequent safety checks inside the 'raw-body' module.

To address this issue, the security patch refactors how values are parsed and explicitly validates the output during middleware configuration:

// Patched logic in body-parser 1.20.6
var limit = typeof opts.limit === 'undefined' || opts.limit === null
  ? 102400 // Safe 100kb default value
  : bytes.parse(opts.limit)
 
// Fail-safe validation check
if (limit === null) {
  throw new TypeError('option limit "' + String(opts.limit) + '" is invalid')
}

By adding this condition, the updated middleware enforces a fail-fast behavior. If the 'limit' configuration is invalid or unparseable, the application throws a 'TypeError' during initialization, halting the startup sequence. This ensures that the application cannot enter a vulnerable, running state.

Exploitation Methodology

Exploitation relies on a misconfigured system where a developer has specified an invalid or typo-ridden limit parameter. Attackers can identify endpoints that parse JSON, urlencoded, or raw payloads by auditing common routes. No authentication or elevated privileges are required to issue the exploit payload.

Once a vulnerable endpoint is identified, the attacker crafts an exceptionally large HTTP POST request. By avoiding standard JSON field limits, the attacker streams a high-volume request body to the target. This request bypasses the size check and forces the V8 engine to allocate heap memory to buffer the payload.

To execute this process exhaustion attack, the client generates a local payload and transmits it over the network to the application server:

# Generate a 100MB dummy payload file
dd if=/dev/zero bs=1M count=100 | tr '\0' 'A' > massive_payload.json
 
# Transmit payload to the target endpoint
curl -X POST -H "Content-Type: application/json" -d @massive_payload.json http://target-app:3000/upload

As the server attempts to buffer the incoming characters into memory, garbage collection thrashing increases. The V8 heap eventually runs out of available space, resulting in an unrecoverable process crash.

Impact Assessment

The primary impact of this vulnerability is a complete denial of service. Because Node.js operates on a single-thread event loop, excessive garbage collection activity blocks other incoming requests. When heap memory is exhausted, the Node.js runtime environment exits immediately with an Out-Of-Memory status.

In containerized or orchestrated environments, crash-loop backoffs may mitigate individual node failures, but continuous exploitation will exhaust orchestrator pool resources. If the application is not configured with process monitoring and automatic restart routines, manual administrator intervention is necessary to restore system availability.

While CVSS rates this vulnerability with a low impact due to the specific pre-configuration requirement, the real-world impact in production systems that consume variable configuration parameters is significant. Applications relying on unvalidated environment variables for horizontal scaling are highly susceptible to this configuration weakness.

Remediation and Code Hardening

The most effective remediation is upgrading the body-parser package to a secure version. Applications built on the '1.x' branch must upgrade to version '1.20.6' or later. Applications built on the '2.x' branch must upgrade to version '2.3.0' or later.

When immediate patching is restricted by organizational constraints, developers must implement configuration sanitation wrappers. Environment variables and custom configuration schemas must be verified to ensure they represent valid numeric values or conform to strict byte-size formats before they are passed to the middleware setup.

const bytes = require('bytes');
 
function getSafeLimit(val) {
  if (val === undefined || val === null) return '100kb';
  const parsed = bytes.parse(val);
  if (parsed === null || !Number.isFinite(parsed)) {
    throw new Error('Critical Configuration Failure: Invalid body-parser limit value');
  }
  return val;
}
 
// Safe middleware registration
app.use(bodyParser.json({ limit: getSafeLimit(process.env.REQUEST_LIMIT) }));

Additionally, static analysis tooling and custom dependency-scanning rules must be implemented. Scanners should flag dynamic assignments to 'limit' within middleware registrations to ensure configurations remain deterministic and secure.

Official Patches

OpenJS FoundationGitHub Security Advisory GHSA-v422-hmwv-36x6

Fix Analysis (2)

Technical Appendix

CVSS Score
3.7/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS Probability
0.25%
Top 84% most exploited

Affected Systems

Applications utilizing Express.js with body-parserNode.js software packages with body-parser dependencies prior to 1.20.6Node.js software packages with body-parser dependencies starting at 2.0.0 and prior to 2.3.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
body-parser
OpenJS Foundation
< 1.20.61.20.6
body-parser
OpenJS Foundation
>= 2.0.0 < 2.3.02.3.0
AttributeDetail
CWE IDCWE-770
Attack VectorNetwork (AV:N)
CVSS v3.13.7 (Low)
EPSS Score0.0025 (Percentile: 16.43%)
Exploit StatusPoC-only
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-770
Allocation of Resources Without Limits or Throttling

Allocation of Resources Without Limits or Throttling

Vulnerability Timeline

Initial fix commit 2322e111cc321413ec2b7b76d01be533d3de9d7d addresses validation logic in utilities
2026-03-04
Refinement commit 3492672eee593d5c158f239b6e9115498a5dbeac integrates fixed logic to parser subsystems
2026-07-07
Official Advisory and CVE-2026-12590 publication
2026-07-09

References & Sources

  • [1]GitHub Security Advisory: body-parser Denial of Service vulnerability
  • [2]OpenJS Foundation Security Advisories
  • [3]NVD - CVE-2026-12590 Detailed Report
  • [4]CVE-2026-12590 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•13 minutes ago•GHSA-8RW6-P7M8-63JP
6.5

GHSA-8RW6-P7M8-63JP: Array Element-Level SELECT Permissions Leak in SurrealDB

SurrealDB versions supporting element-level SELECT permissions on arrays are vulnerable to a logical authorization bypass. Due to an index-shifting error during array filtration, restricted elements can skip permission checks and leak to unauthorized record users.

Alon Barad
Alon Barad
0 views•6 min read
•about 22 hours ago•CVE-2026-12243
7.5

CVE-2026-12243: Incomplete Path Traversal Validation and Percent-Encoding Bypass in NLTK

CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.

Amit Schendel
Amit Schendel
5 views•8 min read
•about 23 hours ago•CVE-2026-73654
8.5

CVE-2026-73654: Prototype Pollution in Trigger.dev leading to Cascading Denial of Service

CVE-2026-73654 is a high-severity prototype pollution vulnerability in Trigger.dev. The flaw occurs during the handling of run-metadata updates through the PUT /api/v1/runs/:runId/metadata endpoint. Because user-supplied keys are parsed directly by the @jsonhero/path library without sanitization, an authenticated attacker with low privileges can pollute the global Object.prototype. This causes database queries via Prisma ORM to fail validation and induces unhandled exceptions in the Prometheus metrics client, resulting in a process-wide denial of service.

Alon Barad
Alon Barad
11 views•6 min read
•1 day ago•CVE-2026-73559
6.5

CVE-2026-73559: Uncontrolled Resource Consumption in vLLM API completions

CVE-2026-73559 is an uncontrolled resource consumption vulnerability in the vLLM engine, specifically within the /v1/completions API endpoint, allowing authenticated attackers to cause application-level denial of service via unbounded prompt arrays.

Amit Schendel
Amit Schendel
10 views•5 min read
•1 day ago•CVE-2026-54526
9.9

CVE-2026-54526: Strict Template Referencing Bypass and Privilege Escalation in Argo Workflows

A critical security bypass vulnerability in Argo Workflows allows authenticated attackers with workflow submission privileges to bypass 'Strict' or 'Secure' template referencing restrictions. By injecting unvalidated fields into the nested ArtifactGC configuration, attackers can execute arbitrary pod patches, leading to host namespace escape and cluster-wide privilege escalation.

Alon Barad
Alon Barad
15 views•6 min read
•1 day ago•CVE-2026-54249
6.8

CVE-2026-54249: Server-Side Request Forgery via Confused Deputy in Pydantic AI UI Adapters

A Server-Side Request Forgery (SSRF) / Confused Deputy vulnerability has been identified in Pydantic AI UI Adapters (such as VercelAIAdapter). Under certain conditions, a malicious client can supply manipulated message history with provider metadata that forces the server to resolve files within privileged cloud environments (AWS S3, Google Cloud Storage) or model providers. This occurs because the adapters deserialize client-provided metadata structures directly into UploadedFile instances without validation, which are subsequently fetched using high-privilege server credentials.

Alon Barad
Alon Barad
7 views•7 min read