{"id":"CVE-2026-118260","aliases":["CVE-2026-118260","GHSA-f48p-c9v4-h7xv","GO-2026-6840"],"related":[],"kind":"vulnerability","state":"published","title":"Echo: BodyDump captures request and response bodies without size limits in v4","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Impact\n\nEcho 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.\n\nRepeated 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.\n\n## Affected versions and patch\n\nEcho v4 versions through v4.16.0 are affected. Upgrade to [v4.16.1](https://github.com/labstack/echo/releases/tag/v4.16.1).\n\nThe 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.\n\n[Fix commit](https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f).\n\n## Workarounds\n\nDisable 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.\n\n## Credits\n\nReported by @q490107865. The patch also incorporates request-body preservation work from @jakezwang in [#3105](https://github.com/labstack/echo/pull/3105).","format":"markdown","source":"ghsa"},{"lang":"en","text":"Echo: BodyDump captures request and response bodies without size limits in v4 in github.com/labstack/echo","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-10-23T20:48:44.000Z","modified":"2026-11-05T23:26:11.132Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-400","CWE-770"],"affected":[{"ranges":[{"version":">= 4.0.0, < 4.16.1","status":"affected"}],"vendor":"labstack","product":"echo","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.16.1"}],"ecosystem":"Go","package":"github.com/labstack/echo/v4","purl":"pkg:golang/github.com/labstack/echo/v4","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.16.1"}],"ecosystem":"Go","package":"github.com/labstack/echo/v4","purl":"pkg:golang/github.com/labstack/echo/v4","source":"go"}],"references":[{"url":"https://github.com/labstack/echo/security/advisories/GHSA-f48p-c9v4-h7xv","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/labstack/echo/releases/tag/v4.16.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/labstack/echo/pull/3105","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/labstack/echo","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-10-30T19:19:33.342Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-118260","url":"https://www.cve.org/CVERecord?id=CVE-2026-118260","licence":"CVE Terms of Use","modified":"2026-10-30T19:19:59.727Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-f48p-c9v4-h7xv","url":"https://github.com/advisories/GHSA-f48p-c9v4-h7xv","licence":"CC-BY-4.0","modified":"2026-11-05T23:26:11.132Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6840","url":"https://pkg.go.dev/vuln/GO-2026-6840","licence":"CC-BY-4.0","modified":"2026-11-05T23:26:11.132Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-118260","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118260","licence":"Public domain","modified":"2026-11-04T23:10:00.223Z"}],"updatedAt":"2026-11-25T22:59:47.668Z","epss":{"score":0.00454,"percentile":0.41108,"date":"2026-12-01T12:00:22.000Z"}}