High · 7.5 Node.js & npm CVE-2026-111181 GHSA-27r3-jxmh-p828
body-parser Denial of Service Flaw Lets a Single Request Crash Node.js/Express Apps (CVE-2026-111181)
A vulnerability in body-parser (CVE-2026-111181) lets a single crafted compressed request crash any Node.js/Express application using default settings. Fixed in body-parser 2.4.0 and 1.20.9.
By PatchBriefing ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
A denial-of-service vulnerability tracked as CVE-2026-111181 affects body-parser, a widely used body-parsing middleware for Node.js and Express applications. The flaw allows a single network request to crash an affected application outright, without needing to reach any specific route or endpoint. Fixes are available, and this briefing explains what happened, why it matters, and what action to take.
What Happened
A vulnerability was identified in body-parser affecting versions before 1.20.9, and versions from 2.0.0 before 2.4.0. A single request carrying a Content-Encoding such as gzip can cause the application to crash with an uncaught exception, terminating the Node.js process. This occurs under body-parser's default configuration, meaning no special setup is required for an application to be exposed.
Technical Cause
When body-parser receives a request with a compression-related Content-Encoding header, it pipes the request body into a decompression stream. After the body has been read, that stream is left without an error listener attached. If the attacker sends a payload consisting of one valid compressed frame followed by extra trailing bytes, the valid frame decodes normally and the application responds as expected. However, the trailing bytes are then delivered to the already-finished decompression stream, which emits an error. Because no error listener is attached, this error is re-thrown as an uncaught exception, crashing the process. Since body parsing happens before routing, any endpoint that parses a request body can trigger this condition — no matching route is required.
Why It Matters
body-parser is one of the most widely deployed Node.js packages, used directly or indirectly by a very large number of Express-based applications. Because the crash can be triggered by an unauthenticated, single request with no user interaction and no need to target a valid route, any internet-facing service using body-parser's default settings for decompression is a potential target for repeated denial-of-service disruption.
Affected Versions
body-parser versions before 1.20.9 are affected (introduced starting from version 0). body-parser versions 2.0.0 up to but not including 2.4.0 are also affected. Versions 1.20.9 and 2.4.0 contain the fix.
Fixes and Mitigation
The issue is fixed in body-parser 1.20.9 and 2.4.0. Users should upgrade to one of these versions or later. As a temporary workaround if upgrading is not immediately possible, disable request-body inflation by setting body-parser's inflate option to false. This causes encoded requests to be rejected before a decompression stream is created, preventing the crash condition.
Recommended Action
Identify all applications and dependencies that use body-parser, either directly or via Express's built-in body parsing, and upgrade to body-parser 1.20.9 or 2.4.0 depending on the major version in use. Where immediate upgrading is not feasible, apply the inflate: false workaround and monitor application uptime for unexpected crashes until the upgrade can be completed.
PatchBriefing score
7.5 / 10 · High
Official CVSS: 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS 0.0049 (35 percentile)
Why this score
The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.
Affected versions
- body-parser < 1.20.9
- vulnerable
- body-parser ≥ 0 < 1.20.9
- vulnerable
- ≥ 1.20.9
- patched
- ≥ 2.4.0
- patched
Reported fixes
The issue is fixed in body-parser 1.20.9 and 2.4.0. Users should upgrade to one of these versions or later. As a temporary workaround if upgrading is not immediately possible, disable request-body inflation by setting body-parser's inflate option to false. This causes encoded requests to be rejected before a decompression stream is created, preventing the crash condition.
How this was built
2 source records were collected, matched and used to prepare the report above.
-
NVD (NIST) database
-
GitHub Advisory Database database
Revision history
- Published
- Generated