Skip to content

[9.5](backport #54234) Update Brotli and Heartbeat CI Node.js for CVE-2026-111497 - #54608

Merged
macdewee merged 2 commits into
9.5from
mergify/bp/9.5/pr-54234
Nov 10, 2026
Merged

macdewee merged 2 commits into
9.5from
mergify/bp/9.5/pr-54234

Conversation

@mergify

@mergify mergify Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Proposed commit message

Update Brotli and Heartbeat CI Node.js versions for CVE-2026-111497.

Upgrade github.com/andybalholm/brotli from 1.2.2 to 1.2.7 and update its checksums. The Go implementation contains the same malformed-input decoder bug, with a potential panic and denial of service rather than native memory corruption.

Update the remaining Heartbeat CI Node.js pins from 22.20.0 to the patched 22.23.4 release:

  • .buildkite/heartbeat/heartbeat-pipeline.yml
  • .buildkite/x-pack/pipeline.xpack.heartbeat.yml
  • .github/workflows/xpack-heartbeat-macos-unit-tests.yml

Add a security changelog entry for the Brotli update.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas — Dependency and CI version changes only.
  • I have made corresponding changes to the documentation — No usage changes requiring documentation.
  • I have made corresponding change to the default configuration files — Not applicable.
  • I have added tests that prove my fix is effective or that my feature works. Where relevant, I have used the stresstest.sh script to run them under stress conditions and race detector to verify their stability. — Existing dependency and integration tests were used to validate these version changes.
  • I have added an entry in ./changelog/fragments using the changelog tool.

Disruptive User Impact

No configuration migration is required. The affected CI jobs will install Node.js 22.23.4.

How to test this PR locally

go mod tidy -diff
go test -count=1 github.com/andybalholm/brotli
go test -count=1 -race github.com/apache/arrow-go/v18/parquet/compress
go test -count=1 -race -timeout=90s -run '^TestParquetWithFiles$' ./x-pack/libbeat/reader/parquet

These checks passed, including Arrow's Brotli round-trip and malformed-input tests.

Filebeat's mage check also passed using a Python 3.11 virtual environment. The existing pinned formatter alters f-strings incorrectly under Python 3.12.

The three CI YAML files were parsed and their Node.js version pins verified.

Related issues

Use cases

Prevent malformed Brotli input from triggering the Go decoder panic and use a patched Node.js runtime in the affected Heartbeat CI jobs.

Screenshots

Not applicable.

Logs

Brotli's own race-enabled suite reported:

--- FAIL: TestDecoderStreaming (0.00s)
    testing.go:1712: race detected during execution of test

The same race reproduced with the previous 1.2.2 dependency version.

The full randomized Parquet race run was stopped after approximately seven minutes. The focused Parquet fixture and Arrow codec race suites passed.


This is an automatic backport of pull request #54234 done by Mergify.

* Update Brotli for CVE-2026-111497

Upgrade github.com/andybalholm/brotli to 1.2.7 to address the malformed-input decoder panic described in GHSA-c9gr-gmg4-2vqv.

* Regenerate NOTICE for the Brotli dependency update

Record Brotli v1.2.7 in the generated dependency notices so the notice check matches the updated Go module.

Assisted-By: Codex

---------

Co-authored-by: Dominik Rosiek <6997361+macdewee@users.noreply.github.com>
(cherry picked from commit 81f8463)

# Conflicts:
#	NOTICE.txt
#	go.mod
#	go.sum
@mergify
mergify Bot requested a review from a team as a code owner November 10, 2026 07:24
@mergify mergify Bot added backport conflicts There is a conflict in the backported pull request labels Nov 10, 2026
@mergify

mergify Bot commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 81f8463 has failed:

On branch mergify/bp/9.5/pr-54234
Your branch is up to date with 'origin/9.5'.

You are currently cherry-picking commit 81f8463.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   changelog/fragments/1793295453-update-brotli-to-1.2.7-to-fix-malformed-input-decoding.yaml

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   NOTICE.txt
	both modified:   go.mod
	both modified:   go.sum

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@botelastic botelastic Bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 10, 2026
@botelastic

botelastic Bot commented Nov 10, 2026

Copy link
Copy Markdown

This pull request doesn't have a Team:<team> label.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)
  • /test : Run the Buildkite pipeline.

@macdewee macdewee self-assigned this Nov 10, 2026
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Dependency Update Analysis

Summary: This PR updates github.com/andybalholm/brotli from v1.2.0 to v1.2.7 (Go indirect dependency) to address CVE-2026-111497 / GHSA-c9gr-gmg4-2vqv; however, unresolved merge-conflict markers in dependency files make this high risk for merge as-is.

github.com/andybalholm/brotli v1.2.0 → v1.2.7

Ecosystem: Go

Check Result
Breaking changes ⚠️ Found (details below)
Testable in PR ✅ Yes
Changelog highlights (v1.2.0 → v1.2.7)
  • Local commit/changelog state this bump fixes malformed-input decoder panic (CVE-2026-111497, GHSA-c9gr-gmg4-2vqv) in Brotli.
  • No GitHub Release entries are published for andybalholm/brotli, so detailed upstream release-note body was unavailable via MCP release APIs.
  • Tag exists for target version (v1.2.7 → commit 33c2a9884269798192b5ecf171288f98939dbe42).
Usage in this repository
  • Bump appears in go.mod:332-334 and go.sum:190-194.
  • The module is marked // indirect; no direct Go imports of github.com/andybalholm/brotli were found in *.go files.
  • PR also updates notice/changelog metadata (NOTICE.txt:44899-44913, changelog/fragments/1793295453-update-brotli-to-1.2.7-to-fix-malformed-input-decoding.yaml:1-4).
  • PR CI is exercisable in PR context (.github/workflows/check-default.yml:4 has pull_request).
Compatibility assessment
  • Dependency-wise, this is a patch-level security update for an indirect Go module; no direct Beats API usage changes were identified.
  • Blocking issue in this PR content: unresolved merge-conflict markers are present in dependency files:
    • go.mod:331 (<<<<<<< HEAD)
    • go.sum:189 (<<<<<<< HEAD)
    • NOTICE.txt:44898 (<<<<<<< HEAD)
  • This currently breaks Go module parsing (go mod why -m github.com/andybalholm/brotli fails with malformed go.mod).
  • Overall risk: high (merge-blocking until conflicts are resolved).

Labels Applied

No labels applied.


What is this? | From workflow: Observability Agentic Workflow — Pull Request

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

Buildkite failures are all caused by unresolved merge-conflict markers committed into go.mod and go.sum on PR head 85aebe8, not by flaky tests or infra. Resolve the conflicted files and re-run CI.

Remediation

  • Resolve conflict markers in go.mod and go.sum (remove <<<<<<<, =======, >>>>>>> blocks), then regenerate clean module metadata (go mod tidy from repo root).
  • Validate before rerun: pre-commit run --all-files and one representative check step (for example make -C filebeat check update && make check-no-changes).
Investigation details

Root Cause

The PR is a backport marked with conflicts, and the Buildkite logs show unresolved conflict markers in dependency files:

  • go.mod:331, go.mod:333, go.mod:335
  • go.sum:189, go.sum:192, go.sum:195

This breaks two job classes across pipelines:

  1. pre-commit fails check-merge-conflict.
  2. check/update fails while parsing go.mod before Mage runs.

Classification: Configuration/source-control conflict artifact (not test flake, not infra).

Evidence

  • Build: https://buildkite.com/elastic/beats/builds/56038
  • Representative jobs:
    • Filebeat: Run pre-commit
    • Filebeat: Run check/update
  • Key excerpts:
    • go.mod:331: Merge conflict string '<<<<<<<' found
    • go.sum:189: Merge conflict string '<<<<<<<' found
    • ../go.mod:331: malformed module path "<<<<<<<": invalid char '<'

Across provided logs:

  • 16 pre-commit logs report merge-conflict markers.
  • 18 check/update logs report go.mod parse errors.

Verification

  • Executed log analysis over all 34 provided failed-job logs under /tmp/gh-aw/buildkite-logs/.
  • Did not run repo tests locally because failure is deterministic from conflict markers in committed files.

Follow-up

After conflict resolution and go mod tidy, rerun Buildkite for this PR. If anything still fails, the next failures should be actionable per-beat and no longer global.


What is this? | From workflow: Observability Agentic Workflow — Status

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Keep the 9.5 side of each conflict in go.mod, go.sum and NOTICE.txt and
only apply the brotli bump to v1.2.7 from the original commit. The
unrelated alexbrainman/sspi bump from main is not introduced.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@mergify

mergify Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is merged.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Dependency Update Analysis

Summary: This PR updates an indirect Go dependency (github.com/andybalholm/brotli v1.2.0 → v1.2.7) to address CVE-2026-111497 / GHSA-c9gr-gmg4-2vqv; overall risk is low.

Dependency 1: github.com/andybalholm/brotli v1.2.0 → v1.2.7

Ecosystem: Go

Check Result
Breaking changes ✅ None found
Testable in PR ✅ Yes (targeted package tests run successfully)
Changelog highlights (v1.2.0 → v1.2.7)
  • Upstream GitHub release notes were unavailable via MCP (get_release_by_tag returned 404 for v1.2.7 and 1.2.7; list_releases returned empty).
  • Local PR metadata confirms the intent and security scope:
    • changelog/fragments/1793295453-update-brotli-to-1.2.7-to-fix-malformed-input-decoding.yaml:3 references GHSA-c9gr-gmg4-2vqv / CVE-2026-111497.
    • Commit message states this fixes a malformed-input decoder panic.
  • CVE-focused assessment: this change is consistent with reducing malformed-input panic/DoS exposure in Brotli decode paths.
Usage in this repository
  • Version bump is in go.mod:331 (github.com/andybalholm/brotli v1.2.7 // indirect) and checksums in go.sum:189-190.
  • No direct imports of github.com/andybalholm/brotli were found in Beats Go code.
  • go mod why -m github.com/andybalholm/brotli resolves usage through:
    • x-pack/libbeat/reader/parquet → github.com/apache/arrow-go/v18/parquet → .../parquet/compress → github.com/andybalholm/brotli.
  • Relevant call sites in Beats parquet ingestion path:
    • x-pack/libbeat/reader/parquet/parquet.go:51
    • x-pack/libbeat/reader/parquet/parquet.go:58
    • x-pack/libbeat/reader/parquet/parquet.go:68
    • x-pack/libbeat/reader/decoder/parquet.go:22
Compatibility assessment
  • This is a patch-level update (v1.2.0 → v1.2.7), not a major-version/path change.
  • Dependency is indirect; no API callsites in Beats directly depend on Brotli symbols.
  • Expected effect is security hardening in decompression behavior for malformed input, with low regression risk to current usage.
  • Validation run:
    • go test ./x-pack/libbeat/reader/parquet ./x-pack/libbeat/reader/decoder ✅

Labels Applied

  • oblt-aw/ai/merge-ready — applied (low-risk indirect security patch, no breaking usage impact found, targeted tests pass).

What is this? | From workflow: Observability Agentic Workflow — Pull Request

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@github-actions

Copy link
Copy Markdown
Contributor

Automerge skipped

Automerge skipped this pull request because the changed files do not match any configured dependency collection.

If this update should be automerged, ask a maintainer to add or adjust a collection, or merge the pull request manually.

See Opt in or opt out for how to enable or disable Automerge collections on the Control Plane Dashboard.

Collections currently enabled for automerge: github-actions, pre-commit, terraform, open-policy-agent, vm-images

Changed files considered:

  • NOTICE.txt
  • changelog/fragments/1793295453-update-brotli-to-1.2.7-to-fix-malformed-input-decoding.yaml
  • go.mod
  • go.sum

@macdewee
macdewee enabled auto-merge (squash) November 10, 2026 14:41
@macdewee
macdewee merged commit dd319ad into 9.5 Nov 10, 2026
247 of 248 checks passed
@macdewee
macdewee deleted the mergify/bp/9.5/pr-54234 branch November 10, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport conflicts There is a conflict in the backported pull request needs_team Indicates that the issue/PR needs a Team:* label oblt-aw/ai/merge-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants