GHSA-h2v8-394m-p7vv: 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.
Published Oct 27, 2026
Affected packages
rustls
- Ecosystem
- Rust (crates.io)
- Affected
- < 0.23.46
- Fixed in
- 0.23.46
- Check
cargo tree -i rustls
rustls
- Ecosystem
- Rust (crates.io)
- Affected
- >= 0.24.0-dev.1, < 0.24.0-dev.2
- Fixed in
- 0.24.0-dev.2
- Check
cargo tree -i rustls
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
References
- 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/releases/tag/v/0.23.46
- https://rustsec.org/advisories/RUSTSEC-2026-0348.html
- https://github.com/advisories/GHSA-h2v8-394m-p7vv
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Rust (crates.io) vulnerabilities
All Rust (crates.io) entriesGHSA-c8m5-c952-6cm4
Rustls: Session Debug formatting exposes TLS master secrets and resumption PSKs
medium4.0Oct 27, 2026GHSA-vp88-798v-h67f
rustls: ECH rejection can expose buffered application data to authenticated outer server before `ech_required` alert
low2.3Oct 27, 2026GHSA-w44r-93j7-qv28
rustls: An unauthenticated ServerHello poisons the per-name key-exchange record, so later ClientHellos carry only a classical X25519 share
low3.7Oct 27, 2026GHSA-2mjx-qc3c-rqvc
Rustls: TLS 1.3 handshake messages incorrectly accepted across encryption level boundaries
medium5.3Oct 5, 2026GHSA-qg5g-gv98-5ffh
rustls network-reachable panic in `Acceptor::accept`
medium6.9Nov 25, 2024CVE-2024-32650
Denial of Service Vulnerability in Rustls Library
high7.5No fixApr 19, 2024
