On this page · 5 sections
  1. How One Gzip Request Takes Down the Process
  2. Affected and Fixed body-parser Versions, and the Express Path
  3. Updating body-parser in Express Projects
  4. Checking an Express Project for the Vulnerable Parser
  5. Sources

Security advisory

Status as of 2026-11-13

CVE-2026-111181

body-parser vulnerable to Denial of Service via trailing bytes after a compressed request body

CVSS 3.17.5High
Affected
from 2.0.0 before 2.4.0, before 1.20.9
First fixed in
1.20.9, 2.4.0The earliest release on each line that fixes these CVEs. The release to install is in the article's upgrade steps.
Exploited
None known · CISA SSVC
Published
2026-10-22

Earlier CVEs this article mentions: CVE-2026-12590

Data: CVE record

Warning

CVE-2026-111181 (GHSA-27r3-jxmh-p828) lets a single request crash any application that uses body-parser with its default options, including Express apps that call express.json() or express.urlencoded(). The advisory rates it high, with a CVSS 3.1 score of 7.5 from the OpenJS CNA, and no authentication or matching route is needed because body parsing runs before routing. body-parser 2.4.0 and 1.20.9, published on October 22, fix it.

How One Gzip Request Takes Down the Process #

body-parser decompresses request bodies by default. When a request carries a Content-Encoding such as gzip, it pipes the request into a decompression stream and, once the body is read, hands control to the next middleware while the request is still piped into that stream, with no error listener attached. The Express security post walks through the sequence: a valid gzip member followed by a zero byte and more data decodes normally, the application even sends its response, and then the trailing bytes reach the finished decoder. The decoder emits an error that nothing catches, and Node.js turns it into an uncaught exception that ends the process.

The post warns that a handful of such requests spread across nodes can take down a whole load-balanced cluster. Where the parser is mounted globally ahead of authentication, the request does not need a valid route or credentials. CISA's SSVC assessment of October 22 rates exploitation as none.

Affected and Fixed body-parser Versions, and the Express Path #

InstalledStatusFixed in
body-parser 2.0.0 through 2.3.0Vulnerable2.4.0
body-parser 1.20.8 and earlierVulnerable1.20.9
Express 5.xDepends on body-parser 2.x through a caret rangeUpdating the lockfile pulls 2.4.0
Express 4.22.xDepends on body-parser 1.20.x through a tilde rangeUpdating the lockfile pulls 1.20.9
Express 4.21.2 and olderPin an exact older body-parserUpgrade Express to 4.22.x, or override body-parser

Most Express applications never import body-parser themselves; express.json() and express.urlencoded() come from it. A search for bodyParser.json in application code therefore misses them, and only the resolved dependency tree shows which version runs. Express 5.3.0, released on October 9, requires body-parser ^2.3.0, so even a fresh install of the newest Express could have resolved the vulnerable 2.3.0 until 2.4.0 appeared.

The same parser had an earlier, low-severity fix: CVE-2026-12590 (GHSA-v422-hmwv-36x6), fixed in 2.3.0 and 1.20.6, made an invalid limit value silently disable the size check. An application that jumps straight to 2.4.0 or 1.20.9 gets both fixes.

Updating body-parser in Express Projects #

  1. Run npm ls body-parser and check every resolved copy against the table, including copies under other packages.
  2. On Express 5.x or 4.22.x, run npm update body-parser and commit the updated lockfile, then rebuild and redeploy container images.
  3. On Express 4.21.2 or older, upgrade Express to 4.22.x, or add an npm overrides entry that forces body-parser 1.20.9.
  4. Until the update ships, set inflate: false on every body-parser or express.json() call in applications that do not need compressed request bodies; encoded requests are then rejected before a decompression stream exists.
  5. Run the application under a process manager that restarts crashed workers, which limits the outage from a single request while the fix rolls out but does not prevent it.
Bash
npm ls body-parser express
npm update body-parser
grep -rnE "express\.(json|urlencoded|raw|text)\(|bodyParser\.|inflate" --include="*.js" --include="*.ts" --include="*.mjs" src/

Checking an Express Project for the Vulnerable Parser #

The first command above prints every resolved body-parser and the Express version that pulls it in; any 2.x below 2.4.0 or 1.x below 1.20.9 is exposed. The search lists the parser calls, so each one can get inflate: false as a stopgap where compressed bodies are not expected. Applications that never parse request bodies, for example ones that only serve static files, do not call the vulnerable code.

The Sentinel’s Call

Every Node.js service that parses request bodies with body-parser or express.json() should update to body-parser 2.4.0 or 1.20.9 now, since one unauthenticated request can end the process. Express 5.x and 4.22.x projects get the fix from a lockfile update; Express 4.21.2 and older need an Express upgrade or an override. Where an update has to wait, inflate: false closes the path for services that do not accept compressed bodies.

Our judgement, drawn only from the facts and sources above.

Verified We installed body-parser 2.4.0 and 1.20.9 from npm and ran them on Nov 13, 2026.

  • body-parser 2.4.0 node -e 'console.log(require("body-parser/package.json").version)'

    2.4.0

    Full output and environment
    node:22-slimsha256:e9f565d32859…
    $ node -e 'console.log(require("body-parser/package.json").version)'
    2.4.0
    $ node -e 'require("body-parser"); console.log("require ok")'
    require ok
  • body-parser 1.20.9 node -e 'console.log(require("body-parser/package.json").version)'

    1.20.9

    Full output and environment
    node:22-slimsha256:e9f565d32859…
    $ node -e 'console.log(require("body-parser/package.json").version)'
    1.20.9
    $ node -e 'require("body-parser"); console.log("require ok")'
    require ok

Isolated container: official image, network off, read-only, no host files. How we check

Sources

  1. CVE-2026-111181: Denial of service in body-parser · Express.js expressjs.com · Oct 28, 2026
  2. GHSA-27r3-jxmh-p828: body-parser vulnerable to Denial of Service via trailing bytes after a compressed request body github.com · Oct 22, 2026
  3. expressjs/body-parser v2.4.0 github.com · Oct 22, 2026
  4. expressjs/body-parser 1.20.9 github.com · Oct 22, 2026

Also consulted

Next reading

Edited and approved by Jarosław Krzemiński. Spotted a mistake? Report a correction or read the corrections policy.