Echo: BodyDump can discard BodyLimit overflow errors for unknown-length requests
cve-program · CVE-2026-118263
PublishedEcho 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.
Read the publisher's advisoryeuvd · EUVD-2026-112395
PublishedEcho 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.
Read the publisher's advisorynvd · CVE-2026-118263
PublishedEcho 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.
Read the publisher's advisoryosv · GHSA-x9ff-22gv-65f4
Published## 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](https://github.com/labstack/echo/releases/tag/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](https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec). 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](https://github.com/labstack/echo/pull/3105).
Read the publisher's advisoryosv · GO-2026-6844
PublishedEcho: BodyDump can discard BodyLimit overflow errors for unknown-length requests 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-118263 · CVE overview and exploitation status
cve-program · CVE-2026-118263
- https://github.com/labstack/echo/security/advisories/GHSA-x9ff-22gv-65f4
- https://github.com/labstack/echo/pull/3105
- https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec
- https://github.com/labstack/echo/releases/tag/v5.4.1
euvd · EUVD-2026-112395
- https://github.com/labstack/echo/security/advisories/GHSA-x9ff-22gv-65f4
- https://github.com/labstack/echo/pull/3105
- https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec
- https://github.com/labstack/echo/releases/tag/v5.4.1
nvd · CVE-2026-118263
- https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec
- https://github.com/labstack/echo/pull/3105
- https://github.com/labstack/echo/releases/tag/v5.4.1
- https://github.com/labstack/echo/security/advisories/GHSA-x9ff-22gv-65f4
osv · GHSA-x9ff-22gv-65f4
- https://github.com/labstack/echo/security/advisories/GHSA-x9ff-22gv-65f4
- https://github.com/labstack/echo/pull/3105
- https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec
- https://github.com/labstack/echo
- https://github.com/labstack/echo/releases/tag/v5.4.1
osv · GO-2026-6844
Related changes
Linked by CVE identifier- Echo: BodyDump can discard BodyLimit overflow errors for unknown-length requests in github.com/labstack/echo · Newly collected advisory · 5 Nov 2026
- Echo: BodyDump can discard BodyLimit overflow errors for unknown-length requests · Advisory content revised · 5 Nov 2026
- 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 remai… · Advisory content revised · 30 Oct 2026