Description
body-parser is body parsing middleware for Node.js and Express. In versions before 1.20.9 and in versions from 2.0.0 before 2.4.0, a single request can crash any application using body-parser with default options. When a request carries a Content-Encoding such as gzip, body-parser pipes it into a decompression stream and, after reading the body, leaves that stream with no error listener. A payload of one valid compressed frame followed by trailing bytes decodes and the application responds normally, but the trailing bytes then reach the already-finished decoder, which emits an error that is re-thrown as an uncaught exception and terminates the process. No matching route is required because body parsing runs before routing, so any endpoint that parses a body is affected. The issue is fixed in body-parser 2.4.0 and 1.20.9, and users should upgrade to one of those versions or later. As a workaround, disable request-body inflation (set the body-parser inflate option to false) so encoded requests are rejected before any decompression stream is created.
Published: 2026-10-22
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service via application crash
Action: Immediate Patch
AI Analysis

Impact

body-parser, a middleware used by Node.js and Express applications, contains a flaw that can cause any request containing a compressed body to terminate the entire application. The vulnerability is triggered when a request contains one valid compressed frame followed by unexpected trailing bytes. After parsing the body, the decompression stream is left without an error listener; the trailing bytes are then processed, an error is emitted, and the application throws an uncaught exception that crashes the process. This results in a loss of availability for all endpoints that parse request bodies. The weakness corresponds to CWE-248: Unexpected Resource Availability Condition.

Affected Systems

The affected components are body-parser versions prior to 1.20.9 and the 2.0.0 series before 2.4.0. Any Express or Node.js application using body-parser with its default configuration (inflate set to true) and exposed routes that accept a request body is susceptible. Updating to body-parser 1.20.9, 2.4.0, or a later release removes the flaw.

Risk and Exploitability

The CVSS score of 7.5 categorises this as a high severity vulnerability, and the absence of an EPSS entry suggests no publicly reported exploitation yet. The issue is not listed in CISA's KEV catalog, but the attack vector is straightforward: an attacker can craft a single HTTP request with a gzip‑encoded body containing trailing data. Because body parsing occurs before routing, no specific endpoint must be targeted; any request that reaches the middleware will trigger the crash. Organisations should treat this as a high‑risk denial‑of‑service vector until a patch is applied.

Generated by OpenCVE AI on October 22, 2026 at 16:19 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade body-parser to version 1.20.9, 2.4.0, or later
  • As an interim measure, configure the middleware to disable inflation by setting the inflate option to false so encoded requests are rejected before decompression occurs
  • Implement network or application‑level rate limiting to reduce the impact of repeated denial‑of‑service attempts until the upgrade is completed

Generated by OpenCVE AI on October 22, 2026 at 16:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-27r3-jxmh-p828 body-parser vulnerable to Denial of Service via trailing bytes after a compressed request body
History

Fri, 23 Oct 2026 00:45:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

threat_severity

Important


Thu, 22 Oct 2026 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Body-parser
Body-parser body-parser
Vendors & Products Body-parser
Body-parser body-parser

Thu, 22 Oct 2026 14:45:00 +0000

Type Values Removed Values Added
Description body-parser is body parsing middleware for Node.js and Express. In versions before 1.20.9 and in versions from 2.0.0 before 2.4.0, a single request can crash any application using body-parser with default options. When a request carries a Content-Encoding such as gzip, body-parser pipes it into a decompression stream and, after reading the body, leaves that stream with no error listener. A payload of one valid compressed frame followed by trailing bytes decodes and the application responds normally, but the trailing bytes then reach the already-finished decoder, which emits an error that is re-thrown as an uncaught exception and terminates the process. No matching route is required because body parsing runs before routing, so any endpoint that parses a body is affected. The issue is fixed in body-parser 2.4.0 and 1.20.9, and users should upgrade to one of those versions or later. As a workaround, disable request-body inflation (set the body-parser inflate option to false) so encoded requests are rejected before any decompression stream is created.
Title body-parser vulnerable to Denial of Service via trailing bytes after a compressed request body
Weaknesses CWE-248
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}


Subscriptions

Body-parser Body-parser
cve-icon MITRE

Status: PUBLISHED

Assigner: openjs

Published:

Updated: 2026-10-22T19:00:31.729Z

Reserved: 2026-10-15T17:35:18.184Z

Link: CVE-2026-111181

cve-icon Vulnrichment

Updated: 2026-10-22T18:59:41.849Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-22T15:17:04.763

Modified: 2026-10-22T19:17:35.797

Link: CVE-2026-111181

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-22T14:29:56Z

Links: CVE-2026-111181 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-22T17:00:09Z

Weaknesses