Disable request body inflation by default (`inflate: false`)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- express, javascript, node.js
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 5.5k
- Fork
- 802
- Merge trung bình
- 7 giờ 54 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của expressjs/body-parser
-
semver-major
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
expressjs/body-parser#775 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update to raw-body v4.0.0Đang mởdeps semver-major
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
expressjs/body-parser#758 · 12 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Almost all non-utf8 encodings are incorrectCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
expressjs/body-parser#680 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
expressjs/body-parser#658 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
expressjs/body-parser#633 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của expressjs/body-parser
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
anothaDev/luci-theme-vantage#143 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kingcharleslzy-ai/dsh-purge#282 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
a-corriger bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
christian-raj/S-Aloha#340 ·
-
area:image documentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày