Improper Handling of Highly Compressed Data (Data Amplification) Affecting github.com/labstack/echo/v4/middleware package, versions >=4.0.0 <4.16.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Improper Handling of Highly Compressed Data (Data Amplification) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMLABSTACKECHOV4MIDDLEWARE-21691661
  • published24 Oct 2026
  • disclosed23 Oct 2026
  • creditUnknown

Introduced: 23 Oct 2026

New CVE NOT AVAILABLE CWE-400  (opens in a new tab)
CWE-409  (opens in a new tab)

How to fix?

Upgrade github.com/labstack/echo/v4/middleware to version 4.16.1 or higher.

Overview

github.com/labstack/echo/v4/middleware is a middleware package for echo.

Affected versions of this package are vulnerable to Improper Handling of Highly Compressed Data (Data Amplification) via the Decompress middleware. An attacker can exhaust memory or CPU resources by sending a small, compressed request that expands to a very large decoded body, especially when handlers read or bind the body. This is only exploitable if the Decompress middleware is enabled and no effective body limit is applied after decompression.

Workaround

This vulnerability can be mitigated by disabling gzip request decompression on exposed routes, placing BodyLimit after Decompress so the application limit applies to decoded bytes, or applying suitable request deadlines and concurrency limits.

CVSS Base Scores

version 4.0
version 3.1