# Rustls: Brotli certificate decompression can allocate an attacker-controlled amount of memory up to 1 GiB before authentication.

Source: https://junglewise.ai/threats/rustls-brotli-certificate-decompression-can-allocate-an-attacker-e90b700c  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-27  
License: CC BY 4.0 with a link back

Severity: low · CVSS 3.7 · Published 2026-10-27

### 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.

Technologies: [rustls (crates.io)](https://junglewise.ai/threats/technologies/rustls). Vendors: [crates.io](https://junglewise.ai/threats/vendors/crates-io).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Low severity, with a CVSS score of 3.7, published 27 October 2026.

**Which products and versions are affected?** rustls (crates.io) < 0.23.46, SEMVER:introduced=0,fixed=0.23.46.

**Is there a fix for This vulnerability?** Yes. rustls (crates.io): upgrade to 0.23.46 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected?** Check whether you run rustls (crates.io) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- rustls (crates.io): upgrade to 0.23.46 or later

  ```sh
  cargo update -p rustls
  ```


## Affected products

- rustls (crates.io) < 0.23.46, SEMVER:introduced=0,fixed=0.23.46

## Identifiers

- GHSA-h2v8-394m-p7vv
- RUSTSEC-2026-0348

## Related threats

- [rustls: ECH rejection can expose buffered application data to authenticated outer server before `ech_required` alert](https://junglewise.ai/threats/rustls-ech-rejection-can-expose-buffered-application-data-to-bdce2178)
- [rustls: An unauthenticated ServerHello poisons the per-name key-exchange record, so later ClientHellos carry only a…](https://junglewise.ai/threats/rustls-an-unauthenticated-serverhello-poisons-the-per-name-key-exchange-5b941b84)
- [Rustls client session debug formatting information disclosure](https://junglewise.ai/threats/rustls-session-debug-formatting-exposes-tls-master-secrets-and-6519d2da)
- [RUSTSEC-2026-0346 - `Debug` impls for client session values expose TLS secrets](https://junglewise.ai/threats/rustsec-2026-0346-debug-impls-for-client-session-values-expose-tls-01a9a3b6)
- [RUSTSEC-2026-0349 - Unauthenticated ServerHello can downgrade later connections to classical key exchange](https://junglewise.ai/threats/rustsec-2026-0349-unauthenticated-serverhello-can-downgrade-later-4fb5a3af)
