CVE-2026-118261
JSON

8.2high

Echo: Decompress permits unbounded gzip expansion in v4

Severity
8.2high CVSS:4.0 by GitHub_M
Exploit likelihood
0.45% (higher than 41% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-h7wr-284f-5qvcGO-2026-6842

Description

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

Product or packageVersionsReported by
labstack echo>= 4.0.0, < 4.16.1CVE List
github.com/labstack/echo/v4 (Go)from 4.0.0 before 4.16.1GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M8.2high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Classification

CWE-400CWE-409

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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.

Go Vulnerability Database

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

NVD (es)

Echo es un framework web de Go. Desde la versión 4.0.0 hasta la 4.16.1 incluida, el middleware de descompresión opcional de Echo v4 expone un flujo de solicitud decodificado con gzip sin limitar su tamaño expandido. Una solicitud comprimida pequeña puede expandirse a un cuerpo muy grande cuando un manejador la lee o la vincula, consumiendo memoria o CPU excesivas y permitiendo que solicitudes repetidas o concurrentes causen denegación de servicio. El middleware no está habilitado por defecto, y limitar solo el tamaño de la solicitud comprimida no limita el tamaño decodificado. Este problema se corrige en la versión 4.16.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-118261 changed 2026-10-29CVE Terms of Use
GitHub Advisory DatabaseGHSA-h7wr-284f-5qvc changed 2026-11-05CC-BY-4.0
Go Vulnerability DatabaseGO-2026-6842 changed 2026-11-05CC-BY-4.0
NVDCVE-2026-118261 changed 2026-11-04Public domain