{"schema":"threatline.record/2","record":{"id":"GHSA-f48p-c9v4-h7xv","aliases":["GHSA-f48p-c9v4-h7xv"],"summary":"Echo: BodyDump captures request and response bodies without size limits in v4","details":"## 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).","categories":["Libraries & packages"],"product":"github.com/labstack/echo/v4","vendor":"","ecosystem":"go","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f48p-c9v4-h7xv","source_modified_at":"2026-10-23T20:48:45Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"ecosystem":"go","name":"github.com/labstack/echo/v4"},"range":">= 4.0.0, < 4.16.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f48p-c9v4-h7xv","source_modified_at":"2026-10-23T21:00:05.290579929Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"name":"github.com/labstack/echo/v4","ecosystem":"Go","purl":"pkg:golang/github.com/labstack/echo/v4"},"ranges":[{"type":"SEMVER","events":[{"introduced":"4.0.0"},{"fixed":"4.16.1"}]}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-f48p-c9v4-h7xv","source_modified_at":"2026-10-23T20:48:45Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"ecosystem":"go","name":"github.com/labstack/echo/v4"},"version":"4.16.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-f48p-c9v4-h7xv","source_modified_at":"2026-10-23T21:00:05.290579929Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"name":"github.com/labstack/echo/v4","ecosystem":"Go","purl":"pkg:golang/github.com/labstack/echo/v4"},"version":"4.16.1"}],"cvss":8.2,"severity":"High","kev":{"listed":false},"epss":{"probability":null,"percentile":null,"score_date":null},"published_at":"2026-10-23T20:48:44Z","modified_at":"2026-10-23T21:00:05.290579929Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-f48p-c9v4-h7xv","fetched_at":"2026-10-23T21:10:45.942435Z","source_modified_at":"2026-10-23T20:48:45Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-f48p-c9v4-h7xv","fetched_at":"2026-10-23T21:10:45.942435Z","source_modified_at":"2026-10-23T21:00:05.290579929Z"}],"sources":["GitHub Advisory Database","OSV"],"references":[{"url":"https://github.com/labstack/echo/security/advisories/GHSA-f48p-c9v4-h7xv","source":"GitHub Advisory Database"},{"url":"https://github.com/labstack/echo/pull/3105","source":"GitHub Advisory Database"},{"url":"https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f","source":"GitHub Advisory Database"},{"url":"https://github.com/labstack/echo/releases/tag/v4.16.1","source":"GitHub Advisory Database"},{"url":"https://github.com/advisories/GHSA-f48p-c9v4-h7xv","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-23T21:00:05.290579929Z","content_hash":"4082b6af6982786485d2bb8873f91c602ce92fdeaa55fb4ee9fdf3071159159a"}}
