Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore
Glossary

Brotli.

Also called br content encoding

Brotli is a lossless compression format used on the web as the content encoding br. Learn how it works and why a decoder bug led to Node2Shell.

Also called
br content encoding
Related terms
Remote Code Execution (RCE)
Sources
8
Written by
Brandefense Research Team
In ShortLast updated November 11, 2026

Brotli is a lossless compression format that makes data smaller so it can be stored or sent faster. It is defined in RFC 7932 and used on the web as the content encoding named br. A flaw in a Brotli decoder, CVE-2026-111497, led to the Node2Shell warnings in October 2026.

01How It Works

How Does Brotli Work?

The Brotli project describes Brotli as a general-purpose lossless compression algorithm. It combines a modern variant of the LZ77 algorithm, Huffman coding and second-order context modeling.

01A modern variant of the LZ77 algorithm
02Huffman coding
03Second-order context modeling

It runs at a speed similar to deflate, but it packs data more densely. Lossless means that nothing is lost: the receiver gets back exactly the data that was sent.

SenderRuns an encoder
br
ReceiverRuns a decoder

The decoder is the part that reads data from outside.

Brotli factDetail
TypeLossless compression format.
SpecificationRFC 7932, published by the IETF for information.
Name on the webContent encoding br.
Building blocksA modern LZ77 variant, Huffman coding and second-order context modeling.
Speed and densitySimilar speed to deflate, with denser output.
Compared with gzipSmaller output, but slower to compress. gzip can suit content that is not cached.
Integrity checkNone in the stream: no checksum and no length.
Decoder bugCVE-2026-111497 in Brotli 1.0.3 through 1.2.0; fixed in 1.0.10, 1.1.1 and 1.2.1.
02Brotli And gzip

How Is Brotli Different From gzip?

gzip is the older format and is based on the Deflate algorithm. Brotli adds second-order context modeling to LZ77 and Huffman coding. MDN says Brotli gives better compression ratios than gzip, but compresses more slowly.

That trade-off decides where each fits. A script or style sheet is compressed once and cached, so Brotli's smaller output pays off. MDN says gzip may be the better choice for content that is not cacheable.

Both are content encodings. The browser lists the ones it can read in the Accept-Encoding header, for example gzip, deflate, br. The server picks one and names it in Content-Encoding. MDN says Brotli works in most modern browsers and suggests a fallback.

03Where It Is Used

Where Is Brotli Used?

Web software can label a message as Brotli with the content encoding br. For example, the Express body-parser library lists br next to gzip, deflate and zstd as encodings it can decode for request bodies. The CVE record for CVE-2026-111497 asks users to update any Brotli libraries or binaries in the affected range, which includes copies bundled inside other software.

body-parser decodes br gzip deflate zstd

Web servers and content delivery networks send pages, scripts and style sheets as Brotli. Cloudflare says it can return Gzip, Brotli or Zstandard responses, depending on what the visitor's browser supports. For nginx, Google publishes the ngx_brotli module, and Apache has had mod_brotli since version 2.4.26.

A stream The format is a stream. The Brotli project notes that it carries no checksum or length, so a decoder cannot notice if parts of the stream were changed on the way.
04Check It

How Do You Check That a Site Uses Brotli?

Ask for Brotli and read the reply headers. This command sends Accept-Encoding: br and prints only the headers:

curl -s -D - -o /dev/null -H "Accept-Encoding: br" https://example.com

A content-encoding: br line means the server sent Brotli. If the line is missing, the server used another encoding or none. The Network tab in a browser's developer tools shows the same header.

05Enable It

How Do You Enable Brotli?

On nginx, add Google's ngx_brotli module and set brotli on. Its README gives levels from 0 to 11, with a default of 6.

On Apache, use mod_brotli, which adds the BROTLI_COMPRESS output filter. Its quality runs from 0 to 11, with a default of 5.

On a CDN, check your provider's compression settings. Cloudflare says its Pro and Business plans compress content with Brotli by default.

Higher levels give smaller files but compress more slowly. Apache's documentation says quality 11 only suits content that is cached. For pages built on every request, use a middle level.

06Security

Is Brotli Safe? The CVE-2026-111497 Decoder Bug

A decoder takes untrusted input and turns it into memory writes. If the decoder has a bug, a crafted stream can corrupt memory.

On 21 October 2026, Node.js fixed such a bug in its bundled Brotli decoder. The flaw is CVE-2026-111497, and researchers call it Node2Shell. Read the Node2Shell analysis for fixed versions and checks, or the CVE-2026-111497 fact sheet.

Root bug · Google’s Brotli library 1.0.3 through 1.2.0

The CVE record places the root bug in Google’s Brotli library, versions 1.0.3 through 1.2.0. Software that bundles that library may need an update too.

1.0.x Fixed in 1.0.10
1.1.x Fixed in 1.1.1
1.2.x Fixed in 1.2.1

CISA added CVE-2026-111497 to its Known Exploited Vulnerabilities catalog on 27 October 2026, with a due date of 10 November. The format is not the problem. Copies of the decoder are, so each one needs Brotli 1.0.10, 1.1.1 or 1.2.1, or a vendor package with the fix backported. Our HTTP2Shell guide lists fixed versions by runtime and Linux distribution.

07Reduce The Risk

How Do You Reduce the Risk?

Pick a step on the path
01 Outside dataKnow which of your services decode data from outside, such as request bodies and fetched files.
08Also Called

Also Called.

Namebr content encoding
Free exposure check Check Your Domain. Enter your company domain and see what is visible from the outside, in about 30 seconds.
09Questions

Questions.

It labels a message body as Brotli-compressed. Libraries such as Express body-parser list br next to gzip, deflate and zstd as encodings they can decode.

10Sources
  1. 01Brotli README, GitHub (Google Brotli)
  2. 02RFC 7932, Brotli Compressed Data Format, IETF
  3. 03body-parser README, Express
  4. 04CVE-2026-111497 record, CVE Program (Google)
  5. 05Wednesday, October 21, 2026 Security Releases, Node.js
  6. 06Brotli compression, MDN
  7. 07mod_brotli, Apache HTTP Server
  8. 08ngx_brotli README, GitHub (Google ngx_brotli)
11In Our Research

In Our Research.

Brandefense logo

Stay Ahead Of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.