CVE-2026-118263: Echo: BodyDump can discard BodyLimit overflow errors for unknown-length requests

Published Oct 23, 2026
·
Updated

Impact

Echo v5's BodyDump middleware captured a bounded prefix, drained the remaining request body while ignoring read errors, and then replaced the body with the captured prefix. With an outer BodyLimit, an unknown-length request such as an HTTP/1.1 chunked request, and a BodyDump capture limit below the BodyLimit threshold, an overflow detected during that drain could be discarded.

The handler could consequently process a truncated request and return success even though the original body exceeded the configured limit. This is a conditional size-policy bypass; no general authentication bypass, production data modification or denial of service is claimed. Known-length requests rejected before BodyDump runs are unaffected by this path.

Affected versions and patch

All v5 releases from v5.0.0 through v5.4.0 contain the affected drain-and-replace logic. Runtime reproduction confirmed v5.4.0; source comparison confirms the same request handling in v5.0.0.

Upgrade to v5.4.1. BodyDump now captures only the configured prefix for logging and reconstructs the handler's reader from that prefix plus the unread original stream. It preserves the original closer and read errors instead of silently draining the rest. Fix commit.

Streaming BodyLimit enforcement still requires the application to consume the request body and handle read errors. The BodyDump capture cap is a logging cap, not an application body limit.

Workarounds

Disable BodyDump on affected routes, or ensure the BodyLimit overflow is detected during the initial capture by setting the capture limit above the enforced body limit. Upgrading is recommended because it also preserves the complete body for handlers.

Credits

Reported by @Duodum. The fix incorporates @jakezwang's request-body preservation work in #3105.

Other sources

Echo is a Go web framework. From 5.0.0 until 5.4.1, Echo v5's BodyDump middleware can discard a BodyLimit overflow error for an unknown-length request when BodyDump's capture limit is below the BodyLimit threshold. BodyDump drains the remaining body while ignoring read errors and replaces it with the captured prefix, so an HTTP/1.1 chunked request can be truncated and processed successfully even though the original body exceeded the configured limit. Known-length requests rejected before BodyDump runs are unaffected, and the issue does not establish a general authentication bypass or denial of service. This issue is fixed in 5.4.1.

— MITRE

Echo: BodyDump can discard BodyLimit overflow errors for unknown-length requests in github.com/labstack/echo

— OSV

Affected Software

8 affected componentsFixes available
Echo Echo>=5.0.0<5.4.1
go/github.com/labstack/echo/v5>=5.0.0<5.4.1
5.4.1
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*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 5.4.1
  2. Upgrade

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

    Fixed in 5.4.1
  3. Configuration

    Disable BodyDump on affected routes.

    Echo v5 BodyDump BodyDump = disabled
  4. Configuration

    Set the BodyDump capture limit above the enforced BodyLimit so overflow is detected during the initial capture.

    Echo v5 BodyDump capture limit = above the enforced BodyLimit threshold

Event History

Oct 23, 2026
Advisory Published
via OSV·08:49 PM
Data Sourced
via OSV·08:49 PM
DescriptionSeverityWeaknessAffected Software
Oct 28, 2026
CVE Published
via MITRE·07:01 PM
Data Sourced
via MITRE·07:01 PM
DescriptionWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Echo v5 deployments from 5.0.0 through 5.4.0 are affected when BodyDump is used with a capture limit below the configured BodyLimit threshold. The affected request pattern is an HTTP/1.1 request with an unknown body length, such as a chunked request.

2

What must an attacker do to trigger the behavior?

An attacker must send an unknown-length request whose body exceeds BodyLimit while BodyDump captures only a smaller prefix. BodyDump can then drain the remainder while ignoring the overflow error and replace the request body with the captured prefix.

3

Are normal requests with a declared content length affected?

No. Known-length requests that exceed the limit are rejected before BodyDump runs.

4

What should teams do if they cannot patch immediately?

The provided information identifies the risky configuration as using BodyDump with a capture limit below BodyLimit for unknown-length requests. Avoid that combination where possible until updating to the fixed 5.4.1 release.

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