Technical impact
Echo’s BodyDump middleware may discard a BodyLimit overflow error for requests that have an unknown length, allowing the middleware to drain the rest of the body while silently ignoring read errors and replacing it with only the prefix that was captured. If an attacker sends a request with a body that exceeds the configured BodyLimit but uses chunked transfer encoding, the middleware can truncate the data and permit further processing, potentially leading to data integrity issues or bypass of size restrictions that the application relies on. The issue does not trigger denial of service or authentication bypass, but it can allow incomplete or malicious payloads to reach downstream handlers. This flaw falls under CWE-252.
Affected Systems
The vulnerability affects applications built with the Go Echo framework from version 5.0.0 up through 5.4.1, when the BodyDump middleware is configured with a capture limit below the BodyLimit threshold. The issue is present in all builds of Echo in that range that use BodyDump for logging or inspection, regardless of other custom middleware.
Risk and Exploitability
The CVSS base score of 6.3 indicates a medium impact. Because the exploit requires control of an HTTP request to an Echo-based server, the attack surface is limited to web-facing services. No public exploit code is currently available and the vulnerability is not listed as a known exploited vulnerability in CISA’s KEV catalog. Without a publicly available exploit, the typical exploitation risk is modest, though the potential for unvalidated truncated payloads may warrant immediate remediation. This is a CWE-252 vulnerability.
Github GHSA