CVE-2026-118260: Echo: BodyDump captures request and response bodies without size limits in v4

Published Oct 23, 2026
·
Updated

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.

Fix commit.

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.

Other sources

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 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.

— Debian

Echo: BodyDump captures request and response bodies without size limits in v4 in github.com/labstack/echo

— OSV

Affected Software

13 affected componentsFixes available
Labstack Echo>=4.0.0<4.16.1
debian/golang-github-labstack-echo<=4.2.1-3, <=4.12.0-1
debian/golang-github-labstack-echo*
debian/golang-github-labstack-echo*
debian/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo.v2*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo.v2*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo*
go/github.com/labstack/echo/v4>=4.0.0<4.16.1
4.16.1
IBM API Connect<=V10.0.8.0 - V10.0.8.13

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/labstack/echo/v4 to a version that resolves this vulnerability.

    Fixed in 4.16.1
  2. Upgrade

    Upgrade github.com/labstack/echo to a version that resolves this vulnerability.

    Fixed in 4.16.1
  3. Configuration

    Disable BodyDump on exposed routes, particularly routes handling large uploads or downloads.

    Echo v4 BodyDump middleware BodyDump = disabled

Event History

Oct 23, 2026
Advisory Published
via OSV·08:48 PM
Data Sourced
via OSV·08:48 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via GitHub·08:48 PM
DescriptionWeaknessAffected Software
Oct 28, 2026
CVE Published
via MITRE·06:56 PM
Data Sourced
via MITRE·06:56 PM
DescriptionWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness
Nov 18, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using Echo v4 from 4.0.0 through 4.16.1 are exposed only if they enable the opt-in BodyDump middleware on a reachable route. BodyDump is not enabled by default.

2

What does an attacker need to do to trigger memory exhaustion?

An unauthenticated client must be able to reach a route using BodyDump. They can send large request bodies or cause the route to generate large responses; repeated or concurrent requests can exhaust process memory.

3

Do request-size limits fully mitigate the issue?

No. External request limits may reduce exposure from oversized request bodies, but they do not limit BodyDump's capture of response bodies.

4

What should be done if an immediate upgrade is not possible?

Disable BodyDump on reachable routes if possible. If it must remain enabled, restrict access to those routes and reduce the ability for clients to submit large request bodies or induce large responses; request limits alone do not address response capture.

5

How can I determine whether my application is affected?

Check whether the application uses Echo v4 between 4.0.0 and 4.16.1 and whether BodyDump middleware is enabled for any route reachable by untrusted clients. Upgrading to 4.16.1 fixes the issue.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203