Skip to content

Upgrade brotli4j to 1.24.0 for CVE-2026-111497 - #903

Merged
ok2c merged 1 commit into
apache:masterfrom
Devdha:security/brotli4j-1.24.0
Oct 24, 2026
Merged

ok2c merged 1 commit into
apache:masterfrom
Devdha:security/brotli4j-1.24.0

Conversation

@Devdha

@Devdha Devdha commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Background

CVE-2026-111497 is an out-of-bounds write in the Google Brotli decoder, fixed in Brotli 1.2.1. HttpClient 5 decompresses Content-Encoding: br responses through the optional brotli4j integration (BrotliDecompressingEntity / InflatingBrotliDataConsumer). The current brotli4j 1.23.0 bundles Brotli 1.2.0, so a malicious or compromised origin can reach the vulnerable decoder.

brotli4j 1.24.0 upgrades the bundled native decoder to Brotli 1.2.1:

Change

  • Bump the brotli4j.version property from 1.23.0 to 1.24.0.

No API or behavior changes.

Testing

./mvnw -pl httpclient5 -am -Dtest="*Brotli*" -DfailIfNoTests=false test

Results:

  • DeflatingBrotliEntityProducerTest: 1 passed
  • InflatingBrotliDataConsumerTest: 4 passed
  • Brotli4jRuntimeTest: 1 passed

Total: 6 tests, 0 failures, 0 errors.

I could not find an existing HTTPCLIENT JIRA for this dependency bump; happy to file one if required before review.

@ok2c
ok2c merged commit 67b0915 into apache:master Oct 24, 2026
10 checks passed
@ok2c

ok2c commented Oct 24, 2026

Copy link
Copy Markdown
Member

Cherry-picked to 5.6.x

ikhoon pushed a commit to line/armeria that referenced this pull request Nov 2, 2026
Motivation:


[CVE-2026-111497](GHSA-x524-jrqf-vwq6)
is an out-of-bounds write in the Brotli decoder, fixed in [Brotli
1.2.1](https://github.com/google/brotli/releases/tag/v1.2.1). Brotli4j
bundles its own native build of the decoder, and Brotli4j 1.23.0 ships
Brotli 1.2.0.

Armeria 1.42.0 depends on Brotli4j 1.23.0 and declares the `native-*`
artifacts 1.23.0 as optional dependencies. When a native artifact is on
the classpath, `DecodingClient` and `DecodingService` decode `br`
content by default through `BrotliStreamDecoder`, which uses Netty's
`BrotliDecoder` and the bundled native decoder.

[Brotli4j
1.24.0](https://github.com/hyperxpro/Brotli4j/releases/tag/v1.24.0)
bundles Brotli 1.2.1. Netty
([netty#18097](netty/netty#18097)) and Apache
HttpClient
([httpcomponents-client#903](apache/httpcomponents-client#903))
made the same upgrade.

Modifications:

- Upgrade Brotli4j from 1.23.0 to 1.24.0. The `native-*` artifacts share
the same version.

Result:

- Applications that use the Brotli4j native artifacts at the version
Armeria declares get the decoder from Brotli 1.2.1.
- `./gradlew :core:test --tests 'com.linecorp.armeria.common.encoding.*'
--tests 'com.linecorp.armeria.server.encoding.*' --tests
'com.linecorp.armeria.client.encoding.*' --tests
'com.linecorp.armeria.server.file.FileServiceTest'` on JDK 25 (macOS
aarch64): 127 tests passed. `BrotliStreamDecoderTest` ran against
`native-osx-aarch64` 1.24.0 and was not skipped.
- `./gradlew --parallel --max-workers=8 build` on JDK 25 (macOS aarch64)
passed: 35,220 tests, 0 failures.
`RequestLogCompleteTest.logCompleteWithAbortedException()` in
`:core:shadedTest` failed once with a `null` `responseCause()` and
passed on rerun. It doesn't use content encoding.
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.

2 participants