GHSA-f48p-c9v4-h7xv

Suggest an improvement
Source
https://github.com/advisories/GHSA-f48p-c9v4-h7xv
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-f48p-c9v4-h7xv/GHSA-f48p-c9v4-h7xv.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-f48p-c9v4-h7xv
Published
2026-10-23T20:48:44Z
Modified
2026-10-23T21:00:05Z
Severity
  • 8.2 (High) CVSS_V4 - 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 CVSS Calculator
Summary
Echo: BodyDump captures request and response bodies without size limits in v4
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-400",
        "CWE-770"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-10-23T20:48:44Z",
    "nvd_published_at":  null,
    "severity":  "HIGH"
}
References

Affected packages

Go / github.com/labstack/echo/v4

Package

Name
github.com/labstack/echo/v4
View open source insights on deps.dev
Purl
pkg:golang/github.com/labstack/echo/v4

Affected ranges

Type
SEMVER
Events
Introduced
4.0.0
Fixed
4.16.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-f48p-c9v4-h7xv/GHSA-f48p-c9v4-h7xv.json"