GHSA-h7wr-284f-5qvcHigh▾ TwilightEcho: Decompress permits unbounded gzip expansion in v4
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 41.3 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Echo v4's opt-in Decompress middleware exposed a gzip-decoded request stream without limiting its expanded size. A small compressed request could therefore produce a very large decoded body. Handlers that read or bind that body could consume excessive memory or CPU, and repeated or concurrent requests could cause denial of service.
The middleware is not enabled by default. A limit on the compressed request size alone does not bound the decompressed size. Applications that already apply an effective body limit after decompression have reduced exposure.
Echo v4 versions through v4.16.0 are affected. Upgrade to v4.16.1.
The patch adds DecompressConfig.MaxDecompressedSize, defaulting to 100 MiB when zero. A value of -1 explicitly disables the limit. Reading beyond the cap returns ErrStatusRequestEntityTooLarge (HTTP 413), including through JSON and XML binding. Bodies exactly at the configured limit remain valid. Streaming enforcement requires callers to handle body-read errors.
Disable gzip request decompression on exposed routes, or place BodyLimit after Decompress so the application limit applies to decoded bytes. Apply suitable request deadlines and concurrency limits as well.
Reported by @q490107865. The exact-limit behavior incorporates @Shubham-Padkonde's work in #3136.
github.com/labstack/echo/v4 >= 4.0.0, < 4.16.1Upgrade to a patched release:
github.com/labstack/echo/v4 4.16.1Connected by shared product, vendor, weakness, or advisory.
GHSA-f48p-c9v4-h7xvHighEcho: BodyDump captures request and response bodies without size limits in v4
GHSA-cxf3-9h37-7rr8CriticalEcho: Rejected WebSocket upgrades can bypass Echo route-level access controls
GHSA-9969-6676-49h5HighEcho: WebSocket proxy can retain connections and handlers after client disconnect
GHSA-x9ff-22gv-65f4MediumEcho: BodyDump can discard BodyLimit overflow errors for unknown-length requests
GHSA-h53f-rm2w-w7rgMedium· 5.3Echo: X-Real-IP extractor trusts the header value instead of the sending peer
CVE-2025-11635Medium· 4.3A weakness has been identified in Tomofun Furbo 360 up to FB0035_FW_036