Memory exhaustion in rustls via Brotli-compressed certificates
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-770.
Summary
The rustls crate is affected from 0 before 0.23.46 and from 0.24.0-dev.1 before 0.24.0-dev.2 with the brotli feature enabled. The Brotli certificate decoder accepts an input-chosen window size that the certificate size limit does not cover (CWE-770). A peer can send a five-byte header that forces a 1 GiB allocation and abort a process whose allocator cannot satisfy it. Clients of malicious servers and servers requesting client certificates are exposed, and no trusted certificate is needed.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
Description from the GitHub advisory
### 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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | rustls (crates.io) | before 0.23.46 | 0.23.46 | Patch available | GHSA-h2v8-394m-p7vv |
| — | rustls (crates.io) | 0.24.0-dev.1 to before 0.24.0-dev.2 | 0.24.0-dev.2 | Patch available | GHSA-h2v8-394m-p7vv |
- rustls (crates.io) Vendor— Affected before 0.23.46 Fixed in 0.23.46 Patch available GHSA-h2v8-394m-p7vv
- rustls (crates.io) Vendor— Affected 0.24.0-dev.1 to before 0.24.0-dev.2 Fixed in 0.24.0-dev.2 Patch available GHSA-h2v8-394m-p7vv
Remediation
Update the rustls crate to 0.23.46 or to 0.24.0-dev.2.
Written with Claude Haiku 5.5 from the sources below · 2026-10-29
- Fix · GHSA-h2v8-394m-p7vv rustls (crates.io) Fixed in 0.23.46 Advisory →
- Fix · GHSA-h2v8-394m-p7vv rustls (crates.io) Fixed in 0.24.0-dev.2 Advisory →
Timeline
- 2026-10-27 Threatist record created from GHSA-h2v8-394m-p7vv
References
Other 8
- https://github.com/rustls/rustls/security/advisories/GHSA-h2v8-394m-p7vv
- https://github.com/rustls/rustls/pull/3297
- https://github.com/rustls/rustls/pull/3354
- https://github.com/rustls/rustls/commit/1aa987af37d0d79b98781d345895ac0059ce345c
- https://github.com/rustls/rustls/commit/402b7b78b7ae87d59e19cf07ee07f3fc19e6537e
- https://github.com/rustls/rustls
- https://github.com/rustls/rustls/releases/tag/v/0.23.46
- https://rustsec.org/advisories/RUSTSEC-2026-0348.html
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences