{"id":"GHSA-h2v8-394m-p7vv","kind":"vulnerability","aliases":["GHSA-h2v8-394m-p7vv"],"related":[],"title":"Rustls: Brotli certificate decompression can allocate an attacker-controlled amount of memory up to 1 GiB before authentication.","description":"### Summary\n\nThe 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.\n\n### Details\n\nrustls 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.\n\n### Impact\n\nClient 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.\n\nPotential for denial of service due to memory exhaustion from peers sending malicious Brotli-encoded certificates, for applications that enable Brotli decompression.\n\n### Acknowledgement\nThanks to OpenAI [OutboundDisclosures@openai.com](mailto:OutboundDisclosures@openai.com) for the disclosure.","summary":"When the optional Brotli feature is enabled, a peer can send a compressed certificate whose header requests a 1 GiB decompression window, forcing a large allocation before any authentication. An attacker can make the process abort or run out of memory, a denial of service.","severity":"low","cvss":3.7,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"rustls","fixed":["0.23.46"],"affected":"< 0.23.46","ecosystem":"cargo"},{"name":"rustls","fixed":["0.24.0-dev.2"],"affected":">= 0.24.0-dev.1, < 0.24.0-dev.2","ecosystem":"cargo"}],"ecosystems":["cargo"],"tags":["cargo","cwe-770","package","rust","rustls","self-hosted"],"not_affected_if":["brotli-feature-disabled","default-config"],"how_to_check":"- Check whether the `brotli` feature of rustls is enabled in `Cargo.toml` or in the lockfile feature set (`cargo tree -e features -i rustls`).\n- Check the rustls version in `Cargo.lock` with `cargo tree -i rustls`, comparing against `0.23.46` and `0.24.0-dev.2`.","fix":"- Upgrade rustls to `0.23.46` or later on the 0.23 line, or to `0.24.0-dev.2` or later on the 0.24 development line.\n- Alternatively, leave the `brotli` feature disabled, since it is off by default.","status":"open","published_at":"2026-10-27T16:08:36+00:00","first_seen_at":"2026-10-27T16:10:07+00:00","triaged_at":"2026-10-27T16:10:58+00:00","updated_at":"2026-10-27T16:10:58+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-10-27T16:10:58Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade rustls to `0.23.46` or later on the 0.23 line, or to `0.24.0-dev.2` or later on the 0.24 development line.\n- Alternatively, leave the `brotli` feature disabled, since it is off by default.","reach":"network","title":"Rustls: Brotli certificate decoding lets a peer exhaust memory before authentication","impact":"low","summary":"When the optional Brotli feature is enabled, a peer can send a compressed certificate whose header requests a 1 GiB decompression window, forcing a large allocation before any authentication. An attacker can make the process abort or run out of memory, a denial of service.","category":"package","nicknames":[],"who_cares":["rust","rustls","cargo","self-hosted"],"confidence":0.85,"needs_auth":"no","worst_case":"Remote peer exhausts process memory, causing a crash or denial of service","analyst_note":"","how_to_check":"- Check whether the `brotli` feature of rustls is enabled in `Cargo.toml` or in the lockfile feature set (`cargo tree -e features -i rustls`).\n- Check the rustls version in `Cargo.lock` with `cargo tree -i rustls`, comparing against `0.23.46` and `0.24.0-dev.2`.","needs_analyst":false,"not_affected_if":["default-config","brotli-feature-disabled"],"who_is_affected":"Only applications that enable the `brotli` feature of rustls are exposed, because that is the only path that decodes Brotli-compressed certificates. Client applications face malicious servers, and server applications that request client certificates face malicious clients. Applications that keep the default feature set can skip this issue.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"low"},"cost_usd":0.000679,"input_tokens":3722,"output_tokens":613,"severity_before":"low"},"analyst_status":null,"analyst_note":null,"search":"'-770':34B '1':16A,59B,118C '394m':23A,28A 'abort':76B,125C 'accept':103C 'acknowledg':249C 'alloc':6A,66B,121C,129C,191C 'amount':11A 'appli':174C,181C 'applic':197C,210C,244C 'attack':9A,71B,159C 'attacker-control':8A 'authent':19A,69B,219C 'bound':98C 'brot':2A,44B,95C,138C,148C,167C,201C,214C,240C,247C 'brotli-encod':239C 'brotlidecompress':164C 'buffer':101C 'built':89C 'built-in':88C 'byte':114C 'call':163C 'cannot':130C 'cargo':32B 'certif':3A,54B,96C,153C,160C,178C,242C 'client':135C,152C,196C,218C,225C 'compress':53B 'connect':140C 'control':10A 'cwe':33B 'decod':97C 'decompress':4A,61B,184C,248C 'default':94C 'denial':83B,228C 'detail':161C 'direct':155C 'disabl':92C 'disclosur':258C 'due':231C 'enabl':47B,137C,147C,166C,199C,212C,217C,246C 'encod':241C 'exhaust':234C 'extens':172C 'featur':45B,202C,215C 'five':113C 'forc':63B 'ghsa':21A,26A 'ghsa-h2v8-394m-p7vv':20A,25A 'gib':17A,60B,119C 'h2v8':22A,27A 'header':56B,111C 'histori':108C 'host':40B 'impact':195C 'input':106C 'input-select':105C 'intern':190C 'larg':65B,170C 'large-window':169C 'limit':176C 'mailto':254C 'make':73B 'malici':207C,224C,238C 'memori':13A,81B,233C 'must':136C,146C 'neither':154C 'openai':252C 'option':43B 'outbounddisclosures@openai.com':253C,255C 'output':100C 'p7vv':24A,29A 'packag':35B 'peer':49B,123C,143C,236C 'potenti':226C 'process':75B,127C,193C 'request':57B,133C,150C 'requir':156C,194C 'result':185C 'run':78B 'rust':36B 'rustl':1A,37B,162C,173C 'rustls':30A,31A 'satisfi':131C 'select':107C 'self':39B 'self-host':38B 'send':51B,237C 'server':145C,208C,209C 'servic':85B,230C 'specifi':116C 'summari':86C 'thank':250C 'trust':158C 'vulner':205C,222C 'whose':55B,128C 'window':62B,109C,120C,171C","nicknames":[],"mitigations":[],"who_affected":"Only applications that enable the `brotli` feature of rustls are exposed, because that is the only path that decodes Brotli-compressed certificates. Client applications face malicious servers, and server applications that request client certificates face malicious clients. Applications that keep the default feature set can skip this issue.","tier":"C","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-27T16:08:36+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-h2v8-394m-p7vv","url":"https://github.com/advisories/GHSA-h2v8-394m-p7vv","severity":"low","published_at":"2026-10-27T16:08:36+00:00","modified_at":"2026-10-27T16:08:36+00:00","first_seen_at":"2026-10-27T16:10:07+00:00","fetched_at":"2026-10-27T16:10:07+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}