Résumé
Echo: Decompress permits unbounded gzip expansion in v4
Détails de l’avis
Impact
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.
Affected versions and patch
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.
Workarounds
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.
Credits
Reported by @q490107865. The exact-limit behavior incorporates @Shubham-Padkonde's work in #3136.
Références
Vulnérabilités liées
Tout Supply chain →- HIGHCVE-2026-96637
Pillow: Decompression bomb check bypass in SpiderImagePlugin.seek() leads to unbounded allocation DoS
- MEDIUMCVE-2026-96636
Pillow: Decompression-bomb protection bypass via multi-frame seek() in MPO and DCX (MpoImageFile.seek / DcxImageFile.seek)
- HIGHCVE-2026-91979
Vikunja: Denial of service via decompression bomb in the data import
- HIGHCVE-2026-107227
AsyncHttpClient: Unbounded WebSocket permessage-deflate decompression enables a decompression-bomb denial of service when compression is enabled
- HIGHCVE-2026-68539
fulgur allows Unbounded string-set value accumulation causes memory/CPU exhaustion (denial of service)
- MEDIUMCVE-2026-63476
isomorphic-git allows unbounded memory allocation from attacker-controlled delta target size (DoS)