Echo v4のBodyDumpに脆弱性、大量のリクエストでサービス停止のおそれ
概要
Echo v4のオプション機能BodyDumpは、リクエストとレスポンスの本文を上限なしでメモリに保持するため、大量のリクエストでメモリを使い果たし、サービス拒否の状態になるおそれがあります。影響を受けるのはv4.16.0までで、v4.16.1に修正版が公開されています。BodyDumpを使っている場合は、修正版への更新を優先して検討してください。
AI要約
外部の AI が作成した要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
Echo v4のオプション機能BodyDumpは、リクエストとレスポンスの本文を上限なしでメモリに保持するため、大量のリクエストでメモリを使い果たし、サービス拒否の状態になるおそれがあります。影響を受けるのはv4.16.0までで、v4.16.1に修正版が公開されています。BodyDumpを使っている場合は、修正版への更新を優先して検討してください。
影響パッケージ
| 種類 | パッケージ | 影響を受ける版 | 直った版 |
|---|---|---|---|
| labstack | echo | — | — |
| go | github.com/labstack/echo/v4 |
4.0.0 以上 4.16.1 未満 |
4.16.1 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Impact
Echo v4's opt-in BodyDump middleware read complete request bodies into memory and retained complete response bodies without a capture limit. A client able to submit large requests to a route using BodyDump could cause large allocations before the application handler ran. Large responses, including responses whose size can be influenced by a client, also caused an additional unbounded capture allocation.
Repeated or concurrent requests can exhaust process memory and cause denial of service. BodyDump is not enabled by default. Deployments with effective request limits may reduce the request-side exposure; response capture requires separate consideration.
Affected versions and patch
Echo v4 versions through v4.16.0 are affected. Upgrade to v4.16.1.
The patch adds BodyDumpConfig.MaxRequestBytes and MaxResponseBytes, each defaulting to 5 MiB when zero. A value of -1 explicitly restores unlimited capture. The complete request remains readable by the handler and the complete response is delivered to the client; only the callback's captured data is bounded. Request close behavior and read errors are preserved.
Workarounds
Disable BodyDump on exposed routes, particularly large uploads and downloads. Alternatively, enforce body-size limits before BodyDump and independently bound the responses that the appl…
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- package github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web github.com
- web github.com