Track vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
3.7

rustls Brotli decoding can consume up to 1 GB memory

published 25 days ago
Summary

If you enable rustls's optional Brotli support, a remote party can send a specially crafted certificate that forces the program to try to allocate about 1 gigabyte of memory. This can cause the application to crash or stop responding, affecting both clients that talk to malicious servers and servers that require client certificates from malicious clients. Disable the Brotli feature unless you need it, or apply an update that adds proper limits.

What to do
  • Update ctz rustls to version 0.23.46.
  • Update ctz rustls to version 0.24.0-dev.2.
Affected software
Ecosystem VendorProductAffected versions
crates.io ctz rustls < 0.23.46
>= 0.24.0-dev.1, < 0.24.0-dev.2
Fix: upgrade to 0.23.46
Original advisory text
Rustls: Brotli certificate decompression can allocate an attacker-controlled amount of memory up to 1 GiB before authentication.
### Summary

The built-in (but disabled by default) Brotli certificate decoder bounds the output buffer but accepts an input-selected history window. A header of five bytes can specify a 1 GiB window allocation. A peer can abort a process whose allocator cannot satisfy that request. A client must enable Brotli and connect to the peer; a server must enable Brotli and request a client certificate. Neither direction requires a trusted attacker certificate.

### Details

rustls calls `BrotliDecompress` which enables Brotli's large-window extension. rustls applies a limit to certificates, but this applies to the decompressed result, and not to any internal allocations the process requires.

### Impact

Client applications that enable the `brotli` feature will be vulnerable to malicious servers. Server applications that enable the `brotli` feature and enable client authentication will be vulnerable to malicious clients.

Potential for denial of service due to memory exhaustion from peers sending malicious Brotli-encoded certificates, for applications that enable Brotli decompression.

### Acknowledgement
Thanks to OpenAI [[email protected]](mailto:[email protected]) for the disclosure.
Fix within
Internet-facing 14 days
Internal 60 days
  • Not known to be exploited
  • Can be exploited automatically (estimated)
  • Gives an attacker partial control (estimated)
Severity
3.7 Low
Type
CWE-770Allocation of Resources Without Limits
Timeline
Published27 Oct 2026
Updated27 Oct 2026
First seen27 Oct 2026
Sources
Track software like this
Free during beta