Disable request body inflation by default (`inflate: false`)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- express, javascript, node.js
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 5.5k
- フォーク
- 802
- 平均マージ
- 7時間 54分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
expressjs/body-parser のほかの issue
-
semver-major
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
expressjs/body-parser#775 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
deps semver-major
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
expressjs/body-parser#758 · コメント 12 件 ·
メンテナーはふだん 1 日以内に返信
-
Almost all non-utf8 encodings are incorrect再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
expressjs/body-parser#680 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
expressjs/body-parser#658 ·
メンテナーはふだん 1 日以内に返信
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
expressjs/body-parser#633 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
expressjs/body-parser の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
anothaDev/luci-theme-vantage#143 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kingcharleslzy-ai/dsh-purge#282 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
a-corriger bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
christian-raj/S-Aloha#340 ·
-
area:image documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信