UBUNTU-CVE-2026-118261: High severity ubuntu/golang-github-labstack-echo.v2 vulnerability
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Echo v4to a version that resolves this vulnerability.Fixed in 4.16.1
Frequently Asked Questions
Are applications using Echo affected by default?
No. The vulnerable Decompress middleware is opt-in and is not enabled by default. Applications are exposed if they enable it and process gzip-compressed requests.
What does an attacker need to exploit this issue?
An attacker does not need authentication or user interaction. They can send a small gzip-compressed request that expands to a very large decoded body when an application handler reads or binds the request.
Which deployments are most exposed?
Applications that enable Echo v4 Decompress middleware and accept attacker-controlled gzip-compressed request bodies are exposed. Repeated or concurrent requests can increase memory or CPU consumption and cause denial of service.
Does limiting the incoming compressed request size mitigate the issue?
No. A limit on the compressed request size does not limit the size of the gzip-decoded body. The expanded request stream must be bounded to prevent decompression-driven resource exhaustion.
What version contains the fix?
The issue is fixed in Echo version 4.16.1. Affected versions are from 4.0.0 until 4.16.1.