GHSA-h2v8-394m-p7vv
Rustls: Brotli certificate decompression can allocate an attacker-controlled amount of memory up to 1 GiB before authentication.
Details
### 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 [OutboundDisclosures@openai.com](mailto:OutboundDisclosures@openai.com) for the disclosure.
Are you affected?
Enter the version of the package you're using.
Affected packages
0Fixed in: 0.23.46Upgrade rustls to 0.23.46 or newer (ecosystem crates.io).
0.24.0-dev.1Fixed in: 0.24.0-dev.2Upgrade rustls to 0.24.0-dev.2 or newer (ecosystem crates.io).
References
- https://github.com/rustls/rustls/security/advisories/GHSA-h2v8-394m-p7vv[WEB]
- https://github.com/rustls/rustls/pull/3297[WEB]
- https://github.com/rustls/rustls/pull/3354[WEB]
- https://github.com/rustls/rustls/commit/1aa987af37d0d79b98781d345895ac0059ce345c[WEB]
- https://github.com/rustls/rustls/commit/402b7b78b7ae87d59e19cf07ee07f3fc19e6537e[WEB]
- https://github.com/rustls/rustls[PACKAGE]
- https://github.com/rustls/rustls/releases/tag/v/0.23.46[WEB]
- https://rustsec.org/advisories/RUSTSEC-2026-0348.html[WEB]
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:cargo/rustls"]}'