Skip to content

fix: bump andybalholm/brotli to v1.2.7 (HTTP2Shell) - #430

Open
EdenComp wants to merge 1 commit into
Danny-Dasilva:mainfrom
EdenComp:fix/brotli-http2shell
Open

EdenComp wants to merge 1 commit into
Danny-Dasilva:mainfrom
EdenComp:fix/brotli-http2shell

Conversation

@EdenComp

@EdenComp EdenComp commented Oct 24, 2026 •

Copy link
Copy Markdown

Summary

  • Bump github.com/andybalholm/brotli from v1.2.0 to v1.2.7 in cycletls/, src/, and the root module so Go MVS also lifts the copy used by utls / fhttp / uquic.
  • CycleTLS does not use Google’s C decoder (CVE-2026-111497 / HTTP2Shell). The Go port had the same block-switch bug and panics (DoS) instead of RCE. Decode happens on Content-Encoding: br in DecompressBody and on TLS cert compression (utls.CertCompressionBrotli).
  • Cap gzip/deflate/brotli inflate with io.LimitReader (64 MiB) so io.ReadAll cannot grow without bound.

Test plan

  • go list -m github.com/andybalholm/brotli is v1.2.7 in cycletls/, src/, and root
  • go test in cycletls/ (includes decompress_test.go: valid Brotli, invalid Brotli does not panic, size cap)
  • Optional: go test -tags=integration ./cycletls/tests/iegration -run 'TestBrotli|TestGZIP|TestDeflate' if httpbin is reachable

The Go Brotli port of HTTP2Shell panics on untrusted Content-Encoding: br
and on TLS cert compression via utls. v1.2.7 is the fixed decoder. Also
bound gzip/deflate/brotli inflate so ReadAll cannot grow without limit.
smeinecke added a commit to smeinecke/cycletls_python that referenced this pull request Oct 26, 2026
Port of Danny-Dasilva/CycleTLS#430 (CVE-2026-111497 / HTTP2Shell). The
Go brotli port shares the block-switch bug: malformed input panics, so
any hostile server could crash the process via Content-Encoding: br in
DecompressBody or via compress_certificate - we advertise brotli cert
compression for every Chromium and Firefox fingerprint.

- github.com/andybalholm/brotli v1.2.6 -> v1.2.7
- readLimited() caps gzip/deflate/brotli inflate at 64 MiB so a small
  compressed payload cannot inflate without bound (decompression bomb).
  DecompressBody keeps its return-original-on-error contract, so
  over-limit bodies pass through untouched.
emircan-sahin added a commit to emircan-sahin/cycletls that referenced this pull request Oct 31, 2026
v1.2.0 panics on a crafted stream (upstream Danny-Dasilva#430); utls decodes brotli for certificate
compression on a goroutine no recover covers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant