Denial of Service Vulnerability in Envoy Proxy – CVE-2022-29225
Envoy's Brotli decompression filter lacked an output size limit, so a small compressed request could expand into a very large buffer in memory. An attacker could send a Brotli zip bomb to cause severe performance degradation or crash the Envoy process through memory exhaustion.
Published on jfrog.com
The JFrog Security Research team is constantly looking for new and previously unknown software vulnerabilities in popular open-source projects to help improve their security posture. As part of this effort, we recently discovered a denial of service (DoS) vulnerability in Envoy Proxy, a widely used open-source edge…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The decompression code buffers all extracted data into one large output buffer without enforcing a maximum size.
Impact
An attacker could cause severe performance issues or crash the Envoy process due to memory exhaustion; the text notes this most likely affects only Brotli configurations, not GZip.
What the attacker needed
Envoy configured with Brotli decompression; Attacker can send HTTP requests to Envoy
The fix
The issue was fixed by upgrading to Envoy 1.19.5, 1.20.4, 1.21.3 or 1.22.1; if upgrading is not possible, remove or replace the Brotli decompressor in the configuration.
How it was found
- Enable the Brotli decompressor filter in the Envoy configuration.
- Create or obtain a Brotli zip bomb file.
- Send the file to Envoy with a request that declares Brotli content encoding.
- Observe memory exhaustion, performance degradation, and eventual crash of the Envoy process.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A proxy server sits between users and websites and can decompress compressed requests. If it does not cap how large the decompressed result can get, a tiny file can expand into gigabytes and use up all the server's memory. That makes the service slow or crash, which is called a denial of service.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.