CVE-2026-118263
JSON

6.3medium

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

Severity
6.3medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.52% (higher than 45% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-x9ff-22gv-65f4GO-2026-6844

Description

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.

Affected

Product or packageVersionsReported by
labstack echo>= 5.0.0, < 5.4.1CVE List
github.com/labstack/echo/v5 (Go)from 5.0.0 before 5.4.1GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Classification

CWE-252

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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.

Go Vulnerability Database

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

NVD (es)

Echo es un framework web de Go. Desde la versión 5.0.0 hasta la 5.4.1, el middleware BodyDump de Echo v5 puede descartar un error de desbordamiento de BodyLimit para una solicitud de longitud desconocida cuando el límite de captura de BodyDump está por debajo del umbral de BodyLimit. BodyDump vacía el cuerpo restante ignorando los errores de lectura y lo reemplaza con el prefijo capturado, por lo que una solicitud HTTP/1.1 fragmentada puede ser truncada y procesada con éxito a pesar de que el cuerpo original excedió el límite configurado. Las solicitudes de longitud conocida rechazadas antes de que se ejecute BodyDump no se ven afectadas, y el problema no establece una omisión de autenticación general ni una denegación de servicio. Este problema se ha solucionado en la versión 5.4.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-118263 changed 2026-11-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-x9ff-22gv-65f4 changed 2026-11-05CC-BY-4.0
Go Vulnerability DatabaseGO-2026-6844 changed 2026-11-05CC-BY-4.0
NVDCVE-2026-118263 changed 2026-11-04Public domain