Echo v4のBodyDumpに脆弱性、大量のリクエストでサービス停止のおそれ
Summary
Echo v4のオプション機能BodyDumpは、リクエストとレスポンスの本文を上限なしでメモリに保持するため、大量のリクエストでメモリを使い果たし、サービス拒否の状態になるおそれがあります。影響を受けるのはv4.16.0までで、v4.16.1に修正版が公開されています。BodyDumpを使っている場合は、修正版への更新を優先して検討してください。
AI summary
Written by an external AI model and may contain mistakes. Check the original description and references below before acting on it.
Echo v4のオプション機能BodyDumpは、リクエストとレスポンスの本文を上限なしでメモリに保持するため、大量のリクエストでメモリを使い果たし、サービス拒否の状態になるおそれがあります。影響を受けるのはv4.16.0までで、v4.16.1に修正版が公開されています。BodyDumpを使っている場合は、修正版への更新を優先して検討してください。
Affected packages
| Ecosystem | Package | Affected | Fixed |
|---|---|---|---|
| labstack | echo | — | — |
| go | github.com/labstack/echo/v4 |
≥ 4.0.0, < 4.16.1 |
4.16.1 |
Fix status by distribution
Fixed packages published by each distribution for this CVE
- Debian DEBIAN-CVE-2026-118260 golang-github-labstack-echo
Original description The description as published by the source.
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…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- package github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web security-advisories@github.com
- web github.com
- web github.com