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

Source: https://junglewise.ai/threats/cve-2026-118261-echo-is-a-go-web-framework-from-4-0-0-until-4-16-1-echo-v4-s-opt  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-28. Updated: 2026-10-28  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/github-com-labstack-echo-v4), [Labstack Echo](https://junglewise.ai/threats/technologies/labstack-echo). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Labstack](https://junglewise.ai/threats/vendors/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

  ```sh
  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

- [https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f](https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f)
- [https://github.com/labstack/echo/releases/tag/v4.16.1](https://github.com/labstack/echo/releases/tag/v4.16.1)

## Related threats

- [Echo web framework arbitrary URI scheme redirect](https://junglewise.ai/threats/cve-2026-118658-echo-is-a-go-web-framework-prior-to-4-15-2-and-5-1-1-context)
- [Echo Go web framework scheme header spoofing and HSTS bypass](https://junglewise.ai/threats/cve-2026-118657-echo-is-a-go-web-framework-prior-to-4-16-0-and-5-4-0-context)
- [Echo open redirect in sanitizeURI with trailing slash redirect](https://junglewise.ai/threats/cve-2026-118656-echo-is-a-go-web-framework-prior-to-4-16-0-and-5-4-0-sanitizeuri)
- [Echo path traversal via double URL encoding in Static middleware](https://junglewise.ai/threats/cve-2026-118655-echo-is-a-go-web-framework-prior-to-4-15-3-and-5-2-0-middleware)
- [Echo path traversal in static file handlers via dot segment normalization](https://junglewise.ai/threats/cve-2026-118654-echo-is-a-go-web-framework-prior-to-4-16-0-and-5-4-0-echo-s)
