Echo: BodyDump captures request and response bodies without size limits in v4
cve-program · CVE-2026-118260
PublishedEcho is a Go web framework. From 4.0.0 until 4.16.1, Echo v4's opt-in BodyDump middleware reads complete request bodies into memory before handlers run and retains complete response bodies for the dump callback without capture limits. An unauthenticated client that can reach a route using BodyDump can submit large bodies or influence large responses, causing repeated or concurrent allocations that exhaust process memory. BodyDump is not enabled by default, and external request limits may reduce request-side exposure but do not bound response capture. This issue is fixed in 4.16.1.
Read the publisher's advisoryeuvd · EUVD-2026-112369
PublishedEcho is a Go web framework. From 4.0.0 until 4.16.1, Echo v4's opt-in BodyDump middleware reads complete request bodies into memory before handlers run and retains complete response bodies for the dump callback without capture limits. An unauthenticated client that can reach a route using BodyDump can submit large bodies or influence large responses, causing repeated or concurrent allocations that exhaust process memory. BodyDump is not enabled by default, and external request limits may reduce request-side exposure but do not bound response capture. This issue is fixed in 4.16.1.
Read the publisher's advisorynvd · CVE-2026-118260
PublishedEcho is a Go web framework. From 4.0.0 until 4.16.1, Echo v4's opt-in BodyDump middleware reads complete request bodies into memory before handlers run and retains complete response bodies for the dump callback without capture limits. An unauthenticated client that can reach a route using BodyDump can submit large bodies or influence large responses, causing repeated or concurrent allocations that exhaust process memory. BodyDump is not enabled by default, and external request limits may reduce request-side exposure but do not bound response capture. This issue is fixed in 4.16.1.
Read the publisher's advisoryosv · GHSA-f48p-c9v4-h7xv
Published## 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](https://github.com/labstack/echo/releases/tag/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. [Fix commit](https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f). ## 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 application generates. ## Credits Reported by @q490107865. The patch also incorporates request-body preservation work from @jakezwang in [#3105](https://github.com/labstack/echo/pull/3105).
Read the publisher's advisoryosv · GO-2026-6840
PublishedEcho: BodyDump captures request and response bodies without size limits in v4 in github.com/labstack/echo
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2026-118260 · CVE overview and exploitation status
cve-program · CVE-2026-118260
- https://github.com/labstack/echo/security/advisories/GHSA-f48p-c9v4-h7xv
- https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f
- https://github.com/labstack/echo/releases/tag/v4.16.1
euvd · EUVD-2026-112369
- https://github.com/labstack/echo/security/advisories/GHSA-f48p-c9v4-h7xv
- https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f
- https://github.com/labstack/echo/releases/tag/v4.16.1
nvd · CVE-2026-118260
- https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f
- https://github.com/labstack/echo/releases/tag/v4.16.1
- https://github.com/labstack/echo/security/advisories/GHSA-f48p-c9v4-h7xv
osv · GHSA-f48p-c9v4-h7xv
- https://github.com/labstack/echo/security/advisories/GHSA-f48p-c9v4-h7xv
- https://github.com/labstack/echo/pull/3105
- https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f
- https://github.com/labstack/echo
- https://github.com/labstack/echo/releases/tag/v4.16.1
osv · GO-2026-6840
Related changes
Linked by CVE identifier- Echo: BodyDump captures request and response bodies without size limits in v4 in github.com/labstack/echo · Newly collected advisory · 5 Nov 2026
- Echo: BodyDump captures request and response bodies without size limits in v4 · Advisory content revised · 5 Nov 2026
- Echo is a Go web framework. From 4.0.0 until 4.16.1, Echo v4's opt-in BodyDump middleware reads complete request bodies into memory before handlers run and retains complete response bodies for the dump callback without capture limits. An un… · Advisory content revised · 30 Oct 2026