Out-of-bounds Write (HTTP2Shell) Affecting brotli package, versions [,1.2.1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Social Trends
Exploit Maturity
Attacked
EPSS
87.99% (100th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-BROTLI-21717207
  • published26 Oct 2026
  • disclosed21 Oct 2026
  • creditmcollina

Introduced: 21 Oct 2026

NewCVE-2026-111497  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade brotli to version 1.2.1 or higher.

Overview

brotli is a Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods. It is similar in speed with deflate but offers more dense compression.

Affected versions of this package are vulnerable to Out-of-bounds Write (HTTP2Shell) via block-switch handling in the Brotli decoder, specifically DecodeBlockTypeAndLength in deps/brotli/c/dec/decode.c. An attacker can execute arbitrary code by supplying a crafted Brotli-compressed stream with an invalid block switch to the code that decodes it; the decoder fails to propagate the block-switch error during command processing, allowing the out-of-bounds write.

Notes

  • At a literal, command, or distance block-switch, the vulnerable path is reached when that stream’s block-type count is at most one (max_block_type <= 1); the decoder’s boolean failure is then discarded by the unsafe switch path, which continues processing.

CVSS Base Scores

version 4.0
version 3.1