CVE-2026-118260
JSON

8.2high

Echo: BodyDump captures request and response bodies without size limits in v4

Severity
8.2high CVSS:4.0 by GitHub_M
Exploit likelihood
0.45% (higher than 41% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-f48p-c9v4-h7xvGO-2026-6840

Description

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.

Affected

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

All scores

GitHub_M8.2high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Classification

CWE-400CWE-770

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

What each source says

CVE List

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.

GitHub Advisory Database

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.

Go Vulnerability Database

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

NVD (es)

Echo es un framework web de Go. Desde la versión 4.0.0 hasta la 4.16.1, el middleware BodyDump opcional de Echo v4 lee los cuerpos completos de las solicitudes en la memoria antes de que se ejecuten los manejadores y retiene los cuerpos completos de las respuestas para la devolución de llamada de volcado (dump callback) sin límites de captura. Un cliente no autenticado que pueda alcanzar una ruta que utilice BodyDump puede enviar cuerpos grandes o influir en respuestas grandes, causando asignaciones repetidas o concurrentes que agotan la memoria del proceso. BodyDump no está habilitado por defecto, y los límites de solicitudes externos pueden reducir la exposición del lado de la solicitud, pero no limitan la captura de respuestas. Este problema está corregido en la versión 4.16.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-118260 changed 2026-10-30CVE Terms of Use
GitHub Advisory DatabaseGHSA-f48p-c9v4-h7xv changed 2026-11-05CC-BY-4.0
Go Vulnerability DatabaseGO-2026-6840 changed 2026-11-05CC-BY-4.0
NVDCVE-2026-118260 changed 2026-11-04Public domain