Skip to content

fix(security): pin httpclient5 to 5.6.3 for CVE-2026-64607 - #31525

Closed
yan-3005 wants to merge 3 commits into
mainfrom
fix/security-httpclient5-cve-2026-64607
Closed

yan-3005 wants to merge 3 commits into
mainfrom
fix/security-httpclient5-cve-2026-64607

Conversation

@yan-3005

@yan-3005 yan-3005 commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Advisory

CVE-2026-64607 — HttpClient (classic i/o) fails to release the underlying connection back to the connection manager when the response Content-Encoding header is invalid or unsupported, leading to a connection leak / pool exhaustion. Async i/o HttpClient is not affected.

Root cause

httpclient5 is currently unmanaged in the root <dependencyManagement>. Actual versions in the build tree (verified via mvn dependency:tree):

  • elasticsearch-deps (shaded): httpclient5 5.4.4 (via elasticsearch-java 9.2.4)
  • opensearch-deps (shaded): httpclient5 5.5 (via opensearch-java 3.4.0)
  • openmetadata-service (transitive): httpclient5 5.5 (via calcite-core → avatica-core)

All three lines are vulnerable.

Fix

Add a single pin at httpclient5 = 5.6.3 next to the existing httpcore5 / httpcore5-h2 block in the root pom. This mirrors the pattern used for the recent httpcore5 / httpcore5-h2 pins (PRs #31442, #31513).

Verification (local mvn dependency:tree with pin applied)

elasticsearch-deps: httpclient5 5.6.3, httpcore5 5.4.3, httpcore5-h2 5.4.3
opensearch-deps:    httpclient5 5.6.3, httpcore5 5.4.3, httpcore5-h2 5.4.3
openmetadata-service (calcite path): httpclient5 5.6.3, httpcore5 5.4.3, httpcore5-h2 5.4.3

Shaded uber-jars produced by the reactor build embed version=5.6.3 in META-INF/maven/org.apache.httpcomponents.client5/httpclient5/pom.properties. Full mvn clean install -DskipTests on :openmetadata-service and reactor succeeds.

Backport

Add label To release so this cherry-picks to 2.0. A separate manual backport PR will cover 1.13.

Test plan

  • CI build on main
  • Nightly rebuild picks up httpclient5-5.6.3.jar
  • AWS Inspector rescan clears CVE-2026-64607 on the collate/server image

Greptile Summary

The PR pins Apache HttpClient 5 at 5.6.3 to address CVE-2026-64607 and adjusts search-client compression ownership for compatibility with the upgraded client.

  • Adds root dependency management for httpclient5 5.6.3 alongside the matching HttpCore 5.4.3 dependencies.
  • Disables HttpClient-level content decompression in Elasticsearch and OpenSearch clients so their higher-level transports retain decompression ownership.
  • Mirrors the production compression configuration in affected integration-test clients.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
pom.xml Pins httpclient5 5.6.3 with the upstream-compatible httpcore5 and httpcore5-h2 5.4.3 versions.
openmetadata-service/src/main/java/org/openmetadata/service/search/elasticsearch/ElasticSearchClient.java Disables lower-level automatic decompression while retaining Elasticsearch Rest5Client compression handling.
openmetadata-service/src/main/java/org/openmetadata/service/search/opensearch/OpenSearchClient.java Disables lower-level automatic decompression while retaining OpenSearch transport compression handling.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/bootstrap/TestSuiteBootstrap.java Aligns the integration-test Elasticsearch client’s compression configuration with production.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/SearchConsumerFieldBehaviorIT.java Aligns the test OpenSearch transport’s decompression ownership with production.
openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/VectorEmbeddingIntegrationIT.java Aligns the vector integration test’s OpenSearch transport configuration with production.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  POM[Root dependency management] --> HC[httpclient5 5.6.3]
  HC --> ES[Elasticsearch transport]
  HC --> OS[OpenSearch transport]
  ES --> ESD[Rest5Client decompression]
  OS --> OSD[ApacheHttpClient5Transport decompression]
  HC -. built-in decompression disabled .-> ESD
  HC -. built-in decompression disabled .-> OSD
Loading

Reviews (2): Last reviewed commit: "Merge branch 'main' into fix/security-ht..." | Re-trigger Greptile

Copilot AI lite review requested due to automatic review settings August 14, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yan-3005 yan-3005 added safe to test Add this label to run secure Github workflows on PRs backend To release Will cherry-pick this PR into the release branch labels Aug 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@yan-3005
yan-3005 force-pushed the fix/security-httpclient5-cve-2026-64607 branch from 5465ffc to 53c7c2a Compare August 14, 2026 09:39
@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 59130d34006b5af83756b73bf47459a7b724d80d in Playwright run 32013351927, attempt 1.

✅ 1027 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 51m 10s

⏱️ Max setup 3m 9s · max shard execution 17m 11s · max shard-job elapsed before upload 21m 17s · reporting 6s

🌐 198.54 requests/attempt · 2.21 app boots/UI scenario · 22.89% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 22.89% (convergence target: at most 15%).
  • Application boot ratio was 2.21 per UI scenario (2309 boots / 1043 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 129 0 0 0 0 0
✅ Shard chromium-02 139 0 0 0 0 0
✅ Shard chromium-03 146 0 0 0 0 0
✅ Shard chromium-04 136 0 0 0 0 0
✅ Shard chromium-05 147 0 0 0 0 0
✅ Shard chromium-06 143 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 7 0 0 0 0 0
✅ Shard ingestion-01 2 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

CVE-2026-64607 — classic HttpClient leaks the underlying connection back
to the manager when the response Content-Encoding is invalid/unsupported.
Affects httpclient5 <= 5.6.2, fixed in 5.6.3.

Currently unmanaged: calcite-core -> avatica -> httpclient5 resolves to
5.5, and elasticsearch-java / opensearch-java shade 5.4.4 / 5.5. Pin at
5.6.3 in root <dependencyManagement>.

httpclient5 5.6.0 turned on automatic gzip decompression in the async
client pipeline by default. Both opensearch-java's
ApacheHttpClient5Transport and elasticsearch-java's Rest5Client also
decompress the response body themselves, so leaving both layers enabled
runs the second decompress pass on already-inflated bytes and throws
"java.util.zip.ZipException: Not in GZIP format" out of
LazyDecompressingInputStream (reproduced locally in
UpdateChildrenAsyncPropagationTest.updateChildrenSubmitsAsyncTaskAndPropagates).

Call HttpAsyncClientBuilder.disableContentCompression() in the transport
config callbacks (OpenSearchClient + ElasticSearchClient) so the high-
level clients own decompression as before.

Verified locally with the pin and the disableContentCompression() calls:
- mvn dependency:tree on openmetadata-service: httpclient5 5.6.3
- Shaded elasticsearch-deps / opensearch-deps uber-jars embed 5.6.3
- All 146 openmetadata-service search.opensearch.* unit tests pass
  (was 1 error before the disableContentCompression() fix)
Copilot AI review requested due to automatic review settings August 14, 2026 10:13
@yan-3005
yan-3005 force-pushed the fix/security-httpclient5-cve-2026-64607 branch from 53c7c2a to 1159884 Compare August 14, 2026 10:13
@yan-3005
yan-3005 requested a review from a team as a code owner August 14, 2026 10:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

… clients

Completes the CVE-2026-64607 fix. The two production clients were patched,
but the integration-test httpclient5 clients still double-decompressed
responses: httpclient5 5.6.0 enables automatic gzip decompression by
default and the ES/OS java clients also decompress, so the second pass ran
over already-inflated bytes and threw 'ZipException: Not in GZIP format'
across the search integration tests.

Add disableContentCompression() to the three test-side builders, mirroring
the production ElasticSearchClient/OpenSearchClient fix:
- TestSuiteBootstrap.createSearchClient (shared ES Rest5Client)
- VectorEmbeddingIntegrationIT (inline OpenSearch transport)
- SearchConsumerFieldBehaviorIT (inline OpenSearch transport)
Copilot AI review requested due to automatic review settings August 17, 2026 09:03
Copilot AI review requested due to automatic review settings August 17, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonika-shah
sonika-shah added this pull request to the merge queue Aug 18, 2026
@sonika-shah
sonika-shah removed this pull request from the merge queue due to a manual request Aug 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — manual (2026-08-18T04:24:30Z)

No failing check on merge-queue commit 2070851 — invalidated by an entry ahead in the queue, or a required check timed out.

pmbrull added a commit that referenced this pull request Aug 18, 2026
…ion test clients

The integration tests build their own OpenSearch/Elasticsearch clients, so they
need the same disableContentCompression() call as the production search clients
once httpclient5 moves to the 5.6 line. Without it they fail with
"java.util.zip.ZipException: Not in GZIP format".

Taken from #31525 by yan-3005.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@pmbrull pmbrull closed this Aug 18, 2026
@github-project-automation github-project-automation Bot moved this to Done ✅ in Shipping Aug 18, 2026
@gitar-bot

gitar-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Pins httpclient5 to version 5.6.3 in the root pom to mitigate CVE-2026-64607 and prevent connection pool exhaustion. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

pmbrull added a commit that referenced this pull request Aug 18, 2026
…ntent compression (#31667)

* fix(search): move httpclient5 to 5.6.3 and disable transport-level content compression

Follow-up to #31657, which pinned httpclient5 to 5.5.2 so it stopped being
mismatched against the httpcore5 5.4 line. 5.5.2 was the minimal fix but it
still sits inside the CVE-2026-64607 range (affects 5.0-alpha1 through 5.6.2:
the classic i/o client leaks a connection when a response carries an invalid
Content-Encoding, exhausting the pool).

5.6.3 clears that CVE and is a better pairing besides: httpclient5-parent 5.6.3
declares httpcore5 5.4.3, exactly the version pinned here, whereas 5.5.2 targets
5.3.6. Client and core now come from the same line Apache releases together.

Moving to the 5.6 line requires one code change. httpclient5 5.6.0 turned on
automatic content decompression in the async client pipeline by default, and
both search transports already decompress the response body themselves. Leaving
both enabled runs the second pass over already-inflated bytes and throws
"java.util.zip.ZipException: Not in GZIP format". Disable it at the transport
layer in OpenSearchClient and ElasticSearchClient and let the search clients own
decompression.

The connection-request timeout bound from #31657 is unchanged.

Note for future bumps: the shaded uber-jars in openmetadata-shaded-deps bundle
org.apache.hc.* unrelocated, so they carry their own copy of httpclient5 and
httpcore5 and precede the standalone jars on the classpath. They inherit this
dependencyManagement block, so a clean build keeps both copies aligned - but the
pin only takes effect once those modules are rebuilt.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* test(search): disable transport-level content compression in integration test clients

The integration tests build their own OpenSearch/Elasticsearch clients, so they
need the same disableContentCompression() call as the production search clients
once httpclient5 moves to the 5.6 line. Without it they fail with
"java.util.zip.ZipException: Not in GZIP format".

Taken from #31525 by yan-3005.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
pmbrull added a commit that referenced this pull request Aug 18, 2026
…ntent compression (#31667)

* fix(search): move httpclient5 to 5.6.3 and disable transport-level content compression

Follow-up to #31657, which pinned httpclient5 to 5.5.2 so it stopped being
mismatched against the httpcore5 5.4 line. 5.5.2 was the minimal fix but it
still sits inside the CVE-2026-64607 range (affects 5.0-alpha1 through 5.6.2:
the classic i/o client leaks a connection when a response carries an invalid
Content-Encoding, exhausting the pool).

5.6.3 clears that CVE and is a better pairing besides: httpclient5-parent 5.6.3
declares httpcore5 5.4.3, exactly the version pinned here, whereas 5.5.2 targets
5.3.6. Client and core now come from the same line Apache releases together.

Moving to the 5.6 line requires one code change. httpclient5 5.6.0 turned on
automatic content decompression in the async client pipeline by default, and
both search transports already decompress the response body themselves. Leaving
both enabled runs the second pass over already-inflated bytes and throws
"java.util.zip.ZipException: Not in GZIP format". Disable it at the transport
layer in OpenSearchClient and ElasticSearchClient and let the search clients own
decompression.

The connection-request timeout bound from #31657 is unchanged.

Note for future bumps: the shaded uber-jars in openmetadata-shaded-deps bundle
org.apache.hc.* unrelocated, so they carry their own copy of httpclient5 and
httpcore5 and precede the standalone jars on the classpath. They inherit this
dependencyManagement block, so a clean build keeps both copies aligned - but the
pin only takes effect once those modules are rebuilt.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* test(search): disable transport-level content compression in integration test clients

The integration tests build their own OpenSearch/Elasticsearch clients, so they
need the same disableContentCompression() call as the production search clients
once httpclient5 moves to the 5.6 line. Without it they fail with
"java.util.zip.ZipException: Not in GZIP format".

Taken from #31525 by yan-3005.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
pmbrull added a commit that referenced this pull request Aug 18, 2026
…ntent compression (#31667)

* fix(search): move httpclient5 to 5.6.3 and disable transport-level content compression

Follow-up to #31657, which pinned httpclient5 to 5.5.2 so it stopped being
mismatched against the httpcore5 5.4 line. 5.5.2 was the minimal fix but it
still sits inside the CVE-2026-64607 range (affects 5.0-alpha1 through 5.6.2:
the classic i/o client leaks a connection when a response carries an invalid
Content-Encoding, exhausting the pool).

5.6.3 clears that CVE and is a better pairing besides: httpclient5-parent 5.6.3
declares httpcore5 5.4.3, exactly the version pinned here, whereas 5.5.2 targets
5.3.6. Client and core now come from the same line Apache releases together.

Moving to the 5.6 line requires one code change. httpclient5 5.6.0 turned on
automatic content decompression in the async client pipeline by default, and
both search transports already decompress the response body themselves. Leaving
both enabled runs the second pass over already-inflated bytes and throws
"java.util.zip.ZipException: Not in GZIP format". Disable it at the transport
layer in OpenSearchClient and ElasticSearchClient and let the search clients own
decompression.

The connection-request timeout bound from #31657 is unchanged.

Note for future bumps: the shaded uber-jars in openmetadata-shaded-deps bundle
org.apache.hc.* unrelocated, so they carry their own copy of httpclient5 and
httpcore5 and precede the standalone jars on the classpath. They inherit this
dependencyManagement block, so a clean build keeps both copies aligned - but the
pin only takes effect once those modules are rebuilt.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

* test(search): disable transport-level content compression in integration test clients

The integration tests build their own OpenSearch/Elasticsearch clients, so they
need the same disableContentCompression() call as the production search clients
once httpclient5 moves to the 5.6 line. Without it they fail with
"java.util.zip.ZipException: Not in GZIP format".

Taken from #31525 by yan-3005.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch

Projects

Status: Done ✅

Development

Successfully merging this pull request may close these issues.

5 participants