RUSTSEC-2026-0447: Unbounded decompression can exhaust memory and CPU resources
Body extractors do not pass their size limits to the decompression layer. A small compressed request can therefore cause a large allocation before the extractor rejects the decoded body. A remote attacker can use this to exhaust memory or CPU resources and cause denial of service.
This affects applications that read compressed request bodies with the corresponding compression feature enabled.
Upgrade to actix-web 4.18.2 or later with actix-http 3.20.1 or later. As a workaround, reject compressed request bodies at a reverse proxy or in middleware before body extraction.
Other sources
The encoding::Decoder stream can expand compressed input into a large output buffer before a caller can enforce its body size limit. An attacker who controls a compressed request or response can cause excessive memory allocation and CPU use, resulting in denial of service.
This affects applications that decode untrusted gzip, deflate, Brotli, or Zstandard bodies with the corresponding compression feature enabled.
Upgrade to actix-http 3.20.1 or later and configure Decoder::limit() when using the decoder directly. Actix Web users must also upgrade to actix-web 4.18.2 or later so that extractors pass their limits to the decoder.
— OSV
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rust/actix-httpto a version that resolves this vulnerability.Fixed in 3.20.1 - Upgrade
Upgrade
rust/actix-webto a version that resolves this vulnerability.Fixed in 4.18.2 - Upgrade
Upgrade
actix-httpto a version that resolves this vulnerability.Fixed in 3.20.1 - Upgrade
Upgrade
actix-webto a version that resolves this vulnerability.Fixed in 4.18.2 - Configuration
Configure Decoder::limit() when using the decoder directly so decompressed output is bounded.
actix-http encoding::Decoder Decoder::limit() = body size limit - Compensating control
Reject compressed request bodies at a reverse proxy or in middleware before body extraction.