Skip to content

fix: patch CVE-2026-42151 in github.com/prometheus/prometheus#369

Merged
openshift-merge-bot[bot] merged 1 commit into
release-2.17from
fix/cve-CVE-2026-42151-prometheus-release-2.17
Jul 8, 2026
Merged

fix: patch CVE-2026-42151 in github.com/prometheus/prometheus#369
openshift-merge-bot[bot] merged 1 commit into
release-2.17from
fix/cve-CVE-2026-42151-prometheus-release-2.17

Conversation

@coleenquadros

Copy link
Copy Markdown

Summary

  • Patches CVE-2026-42151 (GHSA-wg65-39gg-5wfj) — Prometheus Azure AD remote write OAuth client_secret exposed via the /-/config API endpoint
  • Uses a replace directive in go.mod to point github.com/prometheus/prometheus to stolostron/[email protected], which contains the upstream fix (prometheus/prometheus#18587) cherry-picked onto v0.308.0
  • A direct bump to v0.311.3 (the upstream patched version) was not feasible due to extensive breaking API changes in the prometheus Go module between v0.308.0 and v0.311.3

CVE Details

Field Value
CVE CVE-2026-42151
GHSA GHSA-wg65-39gg-5wfj
CVSS 7.5 (High)
Fixed upstream v3.5.3, v3.11.3
Go vuln ID GO-2026-5710

What the fix does

Changes ClientSecret in OAuthConfig from string to config.Secret so the Azure AD OAuth client secret is properly redacted when served through the /-/config HTTP API endpoint.

Verification

  • govulncheck ./... — GO-2026-5710 no longer reported
  • go build ./... — compiles cleanly
  • go mod tidy && go mod verify — passes
  • Unit tests — pass (failures are pre-existing disk/OOM environment issues)

Jira

ACM-36251

Test plan

  • govulncheck confirms CVE resolved
  • go build ./... succeeds
  • go mod verify passes
  • Unit tests pass (no regressions from this change)
  • CI pipeline passes

Use a replace directive to point github.com/prometheus/prometheus to
stolostron/prometheus@cve-2026-42151-v0.308.0 which contains the
upstream fix (prometheus/prometheus#18587) cherry-picked onto v0.308.0.

The fix changes ClientSecret in the Azure AD OAuth config from string
to config.Secret so that it is properly redacted by the /-/config API
endpoint.

Ref: GHSA-wg65-39gg-5wfj
Ref: ACM-36251

Signed-off-by: Coleen Iona Quadros <[email protected]>
Signed-off-by: Coleen Iona Quadros <[email protected]>
@openshift-ci openshift-ci Bot added the approved label Jul 7, 2026

@jacobbaungard jacobbaungard left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci

openshift-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: coleenquadros, jacobbaungard

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [coleenquadros,jacobbaungard]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit f04e276 into release-2.17 Jul 8, 2026
18 checks passed
@openshift-merge-bot
openshift-merge-bot Bot deleted the fix/cve-CVE-2026-42151-prometheus-release-2.17 branch July 8, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants