CVE-2026-12590: Body parser Remote Code Execution Vulnerability

LOW
Advisory Identifier: GHSA-v422-hmwv-36x6
CVSS 3.7
CWE-770
Published
Advisory Summary

CVE-2026-12590 is a LOW (CVSS 3.7) remote code execution vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Body parser libraries in the npm ecosystem. The issue involves body-parser vulnerable to denial of service when invalid limit value silently disables size enforcement. Remediation is available by upgrading affected packages to version 1.20.6, 2.3.0.

CVE-2026-12590 at a Glance

CVE Identifier CVE-2026-12590
GHSA Identifier GHSA-v422-hmwv-36x6
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Body parser
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2026-12590

To remediate this vulnerability, upgrade all affected Body parser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

body-parser fixed: 1.20.6
npm install body-parser@1.20.6
body-parser fixed: 2.3.0
npm install body-parser@2.3.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls body-parser

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-12590, inspect your project dependencies using npm:

npm ls body-parser

Analyze the terminal output to locate any version of Body parser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.20.6), your application is affected.

Note: The npm ls body-parser command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where 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. In Body parser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact 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. ### Patches This issue is fixed in [body-parser@2.3.0](https://github.com/expressjs/body-parser/releases/tag/v2.3.0) and [body-parser@1.20.6](https://github.com/expressjs/body-parser/releases/tag/v1.20.6) via [#698](https://github.com/expressjs/body-parser/pull/698). After the fix, invalid `limit` values throw a clear error at parser construction time instead of silently disabling enforcement. `null` and `undefined` continue to fall back to the default limit (`100kb`). ### Workarounds Validate `limit` before passing it to body-parser. For example, parse the value with [`bytes.parse()`](https://github.com/visionmedia/bytes.js) at startup and reject any configuration where it returns `null` or a non-finite number. ### References - [#698](https://github.com/expressjs/body-parser/pull/698): fix PR - [bytes.js](https://github.com/visionmedia/bytes.js): limit parser

CVE-2026-12590 Affected Body parser Versions

2 component(s)
Fixed Versions:
1.20.62.3.0
Product / Package Ecosystem Affected Versions Fixed Version
body-parser
npm
< 1.20.6
1.20.6
body-parser
npm
≥ 2.0.0
< 2.3.0
2.3.0

References

Frequently Asked Questions

What is CVE-2026-12590?
CVE-2026-12590 is a security vulnerability in Body parser involving body-parser vulnerable to denial of service when invalid limit value silently disables size enforcement under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Body parser versions are affected?
Affected versions include releases prior to 1.20.6, 2.3.0 across affected packages: body-parser.
What version fixes CVE-2026-12590?
Upgrading to 1.20.6, 2.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is body-parser affected?
Yes, body-parser is affected in releases prior to 1.20.6, 2.3.0. Upgrade your dependency to 1.20.6, 2.3.0 or later.
What is the CVSS score of CVE-2026-12590?
CVE-2026-12590 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2026-12590?
CVE-2026-12590 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (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.).
How can I check npm dependencies for CVE-2026-12590?
Run the dependency tree command: 'npm ls body-parser'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v422-hmwv-36x6",
  "modified" : "2026-07-20T23:23:26Z",
  "published" : "2026-07-20T23:23:26Z",
  "aliases" : [ "CVE-2026-12590" ],
  "summary" : "body-parser vulnerable to denial of service when invalid limit value silently disables size enforcement",
  "details" : "### Impact\n\nWhen 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.\n\nThis issue affects applications that pass a programmatically computed or user-configurable value to the `limit` option without validating it first.\n\n### Patches\n\nThis issue is fixed in [body-parser@2.3.0](https://github.com/expressjs/body-parser/releases/tag/v2.3.0) and [body-parser@1.20.6](https://github.com/expressjs/body-parser/releases/tag/v1.20.6) via [#698](https://github.com/expressjs/body-parser/pull/698). After the fix, invalid `limit` values throw a clear error at parser construction time instead of silently disabling enforcement. `null` and `undefined` continue to fall back to the default limit (`100kb`).\n\n### Workarounds\n\nValidate `limit` before passing it to body-parser. For example, parse the value with [`bytes.parse()`](https://github.com/visionmedia/bytes.js) at startup and reject any configuration where it returns `null` or a non-finite number.\n\n### References\n\n- [#698](https://github.com/expressjs/body-parser/pull/698): fix PR\n- [bytes.js](https://github.com/visionmedia/bytes.js): limit parser",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "body-parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.20.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "body-parser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/body-parser/security/advisories/GHSA-v422-hmwv-36x6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-12590"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/body-parser/pull/698"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/body-parser/pull/741"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/body-parser/commit/2322e111cc321413ec2b7b76d01be533d3de9d7d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/body-parser/commit/3492672eee593d5c158f239b6e9115498a5dbeac"
  }, {
    "type" : "WEB",
    "url" : "https://cna.openjsf.org/security-advisories.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/expressjs/body-parser"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/body-parser/releases/tag/1.20.6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/expressjs/body-parser/releases/tag/v2.3.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-20T23:23:26Z",
    "nvd_published_at" : "2026-07-09T11:16:24Z"
  }
}