CVE-2026-118261: Echo Decompress middleware denial of service

CVE-2026-118261 · Severity: info · Published 2026-10-28

Echo is a popular Go web framework that handles HTTP requests. The optional Decompress middleware, which automatically decompresses gzip-encoded request bodies, fails to limit the size of data after decompression. An attacker can send a small compressed request that expands to enormous size when decompressed, exhausting server memory and CPU, and can repeat this attack to cause denial of service. The middleware is disabled by default, so only applications that explicitly enable it are affected.

Technologies: github.com/labstack/echo/v4 (Go), Labstack Echo. Vendors: Go, Labstack.

Quick answers

Is CVE-2026-118261 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-118261 being exploited in the wild.
How severe is CVE-2026-118261?
Informational severity, published 28 October 2026.
Which products and versions are affected?
github.com/labstack/echo/v4 (Go) SEMVER:introduced=4.0.0,fixed=4.16.1; Labstack Echo 4.0.0 through 4.16.0.
Is there a fix for CVE-2026-118261?
Yes. github.com/labstack/echo/v4 (Go): upgrade to 4.16.1 or later. Until then: Do not enable the Decompress middleware unless decompressed request sizes are known and bounded. Independently configure a request body size limit via BodyLimit middleware after decompression to further constrain memory usage. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-118261 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-118261?
Check whether you run github.com/labstack/echo/v4 (Go) or Labstack Echo at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/labstack/echo/v4 (Go): upgrade to 4.16.1 or later
    go get github.com/labstack/echo/v4@v4.16.1

Do not enable the Decompress middleware unless decompressed request sizes are known and bounded. Independently configure a request body size limit via BodyLimit middleware after decompression to further constrain memory usage.

Technical details

The Decompress middleware in Echo v4.0.0–4.16.0 does not bound the decompressed size of request bodies, allowing gzip-bomb attacks. An attacker can send a highly compressed payload that expands during decompression, causing excessive memory consumption and CPU use when handlers read or bind the request. The vulnerability requires the middleware to be explicitly enabled. Echo 4.16.1 implements a configurable 100 MiB decompression cap, returning HTTP 413 for oversized bodies.

Affected products

  • labstack Echo 4.0.0 through 4.16.0

Identifiers

  • CVE-2026-118261
  • GHSA-h7wr-284f-5qvc
  • GO-2026-6842

Timeline

  • 2026-10-28: disclosed
  • 2026-10-22: patched

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.