Skip to content
Heist/ feed
Back to feed
Low

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-12590
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 03:05 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 9 Jul 2026, 10:21 UTC

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.

osv:CVE-2026-12590
Complete source record
{
  "id": "d308310d50a97e53c645769c5b6a81800408e142d1c7c9326e6e12041ba5a485",
  "url": "https://osv.dev/vulnerability/CVE-2026-12590",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "body-parser vulnerable to denial of service when invalid limit value silently disables size enforcement",
    "summary": "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.",
    "evidence": "osv:CVE-2026-12590",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2026-12590",
      "aliases": [
        "CVE-2026-12590",
        "GHSA-v422-hmwv-36x6"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/expressjs/body-parser",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5cc4fb8867c93a3aa4455927e38858c9ab89ff43"
                },
                {
                  "introduced": "9e06a79ca94da7c603a03d7deec56a54f8951330"
                },
                {
                  "fixed": "d0f2ace6c74769da7d19b8661b9a01c01bdb0bf7"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:openjsf:body-parser:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.20.6"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:openjsf:body-parser:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "fixed": "2.3.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.20.5",
            "v2.2.2",
            "1.20.4",
            "v2.2.1",
            "v2.2.0",
            "v2.1.0",
            "2.0.1",
            "1.20.3",
            "2.0.0",
            "1.20.2",
            "1.20.1",
            "1.20.0",
            "1.19.2",
            "1.19.1",
            "1.19.0",
            "1.18.3",
            "1.18.2",
            "1.18.1",
            "1.18.0",
            "1.17.2",
            "1.17.1",
            "1.17.0",
            "1.16.1",
            "1.16.0",
            "1.15.2",
            "1.15.1",
            "1.15.0",
            "1.14.2",
            "1.14.1",
            "1.14.0",
            "1.13.3",
            "1.13.2",
            "1.13.1",
            "1.13.0",
            "1.12.4",
            "1.12.3",
            "1.12.2",
            "1.12.1",
            "1.12.0",
            "1.11.0",
            "1.10.2",
            "1.10.1",
            "1.10.0",
            "1.9.3",
            "1.9.2",
            "1.9.1",
            "1.9.0",
            "1.8.4",
            "1.8.3",
            "1.8.2",
            "1.8.1",
            "1.8.0",
            "1.7.0",
            "1.6.7",
            "1.6.6",
            "1.6.5",
            "1.6.4",
            "1.6.3",
            "1.6.2",
            "1.6.1",
            "1.6.0",
            "1.5.2",
            "1.5.1",
            "1.5.0",
            "1.4.3",
            "1.4.2",
            "1.4.1",
            "1.4.0",
            "1.3.1",
            "1.3.0",
            "1.2.2",
            "1.2.1",
            "1.2.0",
            "1.1.2",
            "1.1.1",
            "1.1.0",
            "1.0.2",
            "1.0.1",
            "1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-12590.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.829714666Z",
      "provider": "osv",
      "references": [
        "https://cna.openjsf.org/security-advisories.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/12xxx/CVE-2026-12590.json",
        "https://github.com/expressjs/body-parser/security/advisories/GHSA-v422-hmwv-36x6",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-12590"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-770"
        ],
        "cna_assigner": "openjs",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/12xxx/CVE-2026-12590.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-12590",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 499880,
  "published_at": "2026-07-09T10:21:10.447+00:00"
}