Disable request body inflation by default (`inflate: false`)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- express, javascript, node.js
Research direction
Start by reading the parser option handling and migration notes for the next major version; the issue does not name specific files or tests. Trace how inflate defaults across the parsers, then check existing tests for compressed request bodies. Done when inflation defaults to false, explicit inflate: true still works, and the migration notes explain the change.
Written by the indexing model from the issue text.
Description
Summary
All parsers in body-parser inflate compressed request bodies by default (inflate: true). In 2.x this includes Brotli (br). Many users may be unaware that their app decompresses attacker-controlled request bodies.
I'd like to propose making inflation opt-in in the next major version.
Proposal
- Change the default of
inflatetofalse(semver-major). - Document the change prominently in the migration notes.
Example
With this change, request inflations are opt-out by default and users should knowingly opt in.
app.use(express.json({ inflate: true }))
app.use(express.urlencoded({ extended: false, inflate: true }))
Motivation
Primary: CVE-2026-111497
CVE-2026-111497 is an out-of-bounds write in the Brotli decoder bundled with Node.js that can lead to remote code execution. It is fixed in 22.23.4, 24.22.1 and 26.12.1. An application is exposed when it decompresses attacker-controlled Brotli data, such as a request body.
With the current defaults, any Express 5 app using the built-in body parsers decodes Content-Encoding: br request bodies. Patching Node.js is the real fix. Still, an opt-in default would have kept this attack surface closed for the many apps that never need compressed request bodies.
Secondary considerations
- WAF bypasses. Some WAFs and proxies do not decompress request bodies. The app silently accepting encodings that the inspection layer may not see is a risk users should opt into knowingly.
- Decompression bombs.
limitmitigates this. However, CVE-2026-12590 showed that a misconfiguredlimitcould silently disable size enforcement, so accepting compressed bodies should be a deliberate choice.
- Dominant language
- JavaScript
- Stars
- 5.5k
- Forks
- 802
- Avg merge
- 7h 54m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from expressjs/body-parser
-
semver-major
Difficulty 5/5 Over a week Newbie friendliness 28/100
expressjs/body-parser#775 · 1 reaction ·
Maintainers usually reply within 1 day
-
deps semver-major
Difficulty 3/5 1-2 days Newbie friendliness 65/100
expressjs/body-parser#758 · 12 comments ·
Maintainers usually reply within 1 day
-
Almost all non-utf8 encodings are incorrectMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
expressjs/body-parser#680 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
expressjs/body-parser#658 ·
Maintainers usually reply within 1 day
-
question
Difficulty 4/5 3-5 days Newbie friendliness 30/100
expressjs/body-parser#633 · 1 comment ·
Maintainers usually reply within 1 day
All issues in expressjs/body-parser
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
OWASP/CheatSheetSeries#3018 ·
Maintainers usually reply within 1 day
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPossibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mit-cml/appinventor-sources#4246 · 1 comment ·
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 83/100
GoogleChrome/modern-web-guidance-src#3675 · 2 comments ·
Maintainers usually reply within 1 day