CVE-2026-118261: Echo: Decompress permits unbounded gzip expansion in v4

Published Oct 23, 2026
·
Updated

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.

Fix commit.

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.

Other sources

Echo is a Go web framework. From 4.0.0 until 4.16.1, Echo v4's opt-in Decompress middleware exposes a gzip-decoded request stream without limiting its expanded size. A small compressed request can expand into a very large body when a handler reads or binds it, consuming excessive memory or CPU and allowing repeated or concurrent requests to cause denial of service. The middleware is not enabled by default, and limiting only the compressed request size does not bound the decoded size. This issue is fixed in 4.16.1.

— Debian

Echo: Decompress permits unbounded gzip expansion in v4 in github.com/labstack/echo

— OSV

Affected Software

13 affected componentsFixes available
Labstack Echo>=4.0.0<4.16.1
debian/golang-github-labstack-echo<=4.2.1-3, <=4.12.0-1
debian/golang-github-labstack-echo*
debian/golang-github-labstack-echo*
debian/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo.v2*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo.v2*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo*
go/github.com/labstack/echo/v4>=4.0.0<4.16.1
4.16.1
IBM API Connect<=V10.0.8.0 - V10.0.8.13

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/labstack/echo/v4 to a version that resolves this vulnerability.

    Fixed in 4.16.1
  2. Upgrade

    Upgrade github.com/labstack/echo to a version that resolves this vulnerability.

    Fixed in 4.16.1
  3. Configuration

    Disable gzip request decompression on exposed routes.

    Echo v4 Decompress middleware gzip request decompression = disabled
  4. Compensating control

    Apply request deadlines and concurrency limits to reduce denial-of-service exposure from repeated or concurrent requests.

Event History

Oct 23, 2026
Advisory Published
via OSV·08:49 PM
Data Sourced
via OSV·08:49 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via GitHub·08:49 PM
DescriptionWeaknessAffected Software
Oct 28, 2026
CVE Published
via MITRE·06:58 PM
Data Sourced
via MITRE·06:58 PM
DescriptionWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness
Nov 18, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using Echo v4 from 4.0.0 through 4.16.0 are exposed only if they have enabled the opt-in Decompress middleware. The middleware is not enabled by default.

2

What does an attacker need to do to trigger the denial of service?

An attacker can send a small gzip-compressed request that expands into a very large decoded body when an application handler reads or binds the request. Repeated or concurrent requests can consume excessive memory or CPU.

3

Does a compressed request-size limit mitigate the issue?

No. Limiting only the compressed request size does not limit the size of the gzip-decoded request body.

4

What version fixes the issue?

The issue is fixed in Echo v4.16.1.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203