Skip to main content
← All vulnerabilities
GHSA-H2V8-394M-P7VVRUSTSEC-2026-0348

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

Published
Last modified
published
Not listed in CISA KEV
Low (ghsa)
Fix
Fixed in 0.23.46, 0.24.0-dev.2
None on Exploit-DB, Metasploit or GitHub

Summary

Rustls, the TLS library, is affected when its optional, disabled-by-default Brotli certificate decompression feature is enabled. A malicious peer can send a specially crafted Brotli-compressed certificate that forces the process to allocate up to 1 GiB of memory before authentication, which can crash applications that run out of memory and cause denial of service.

Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.

Read the original description

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 for the disclosure.

Timeline

  1. Advisory published
  2. Record last updated
  3. First seen by cve.now

Affected versions

  • rustlscrates.io

    fixed in 0.23.46

  • rustlscrates.io

    From 0.24.0-dev.1 · fixed in 0.24.0-dev.2

References 8

GitHub · rustls/rustls

rustsec.org