Skip to content

fix(deps): update module github.com/prometheus/prometheus to v0.311.3 [security]#1085

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/go-github.com-prometheus-prometheus-vulnerability
Open

fix(deps): update module github.com/prometheus/prometheus to v0.311.3 [security]#1085
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/go-github.com-prometheus-prometheus-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 17, 2026

This PR contains the following updates:

Package Change Age Confidence
github.com/prometheus/prometheus v0.55.1v0.311.3 age confidence

Prometheus has Stored XSS via metric names and label values in Prometheus web UI tooltips and metrics explorer

CVE-2026-40179 / GHSA-vffh-x6r8-xx99

More information

Details

Impact

Stored cross-site scripting (XSS) via crafted metric names in the Prometheus web UI:

  • Old React UI + New Mantine UI: When a user hovers over a chart tooltip on the Graph page, metric names containing HTML/JavaScript are injected into innerHTML without escaping, causing arbitrary script execution in the user's browser.
  • Old React UI only: When a user opens the Metric Explorer (globe icon next to the PromQL expression input field), and a metric name containing HTML/JavaScript is rendered in the fuzzy search results, it is injected into innerHTML without escaping, causing arbitrary script execution in the user's browser.
  • Old React UI only: When a user views a heatmap chart and hovers over a cell, the le label values of the underlying histogram buckets are interpolated into innerHTML without escaping. While le is conventionally a numeric bucket boundary, Prometheus does not enforce this — arbitrary UTF-8 strings are accepted as label values, allowing script injection via a crafted scrape target or remote write.

With Prometheus v3.x defaulting to UTF-8 metric and label name validation, characters like <, >, and " are now valid in metric names and labels, making this exploitable.

An attacker who can inject metrics (via a compromised scrape target, remote write, or OTLP receiver endpoint) can execute JavaScript in the browser of any Prometheus user who views the metric in the Graph UI. From the XSS context, an attacker could for example:

  • Read /api/v1/status/config to extract sensitive configuration (although credentials / secrets are redacted by the server)
  • Call /-/quit to shut down Prometheus (only if --web.enable-lifecycle is set)
  • Call /api/v1/admin/tsdb/delete_series to delete data (only if --web.enable-admin-api is set)
  • Exfiltrate metric data to an external server

Both the new Mantine UI and the old React UI are affected. The vulnerable code paths are:

  • web/ui/mantine-ui/src/pages/query/uPlotChartHelpers.ts — tooltip innerHTML with unescaped labels.__name__
  • web/ui/react-app/src/pages/graph/GraphHelpers.ts — tooltip content with unescaped labels.__name__
  • web/ui/react-app/src/pages/graph/MetricsExplorer.tsx — fuzzy search results rendered via dangerouslySetInnerHTML without sanitization
  • web/ui/react-app/src/vendor/flot/jquery.flot.heatmap.js — heatmap tooltip with unescaped label values
Patches

A patch has been published in Prometheus 3.5.2 LTS and Prometheus 3.11.2. The fix applies escapeHTML() to all user-controlled values (metric names and label values) before inserting them into innerHTML. This advisory will be updated with the patched version once released.

Workarounds
  • If using the remote write receiver (--web.enable-remote-write-receiver), ensure it is not exposed to untrusted sources.
  • If using the OTLP receiver (--web.enable-otlp-receiver), ensure it is not exposed to untrusted sources.
  • Ensure scrape targets are trusted and not under attacker control.
  • Do not enable admin / mutating API endpoints (e.g. --web.enable-admin-api or web.enable-lifecycle) in cases where you cannot prevent untrusted data from being ingested.
  • Users should avoid clicking untrusted links, especially those containing functions such as label_replace, as they may generate poisoned label names and values.
Acknowledgements

Thanks to @​gladiator9797 (Duc Anh Nguyen from TinyxLab) for reporting this.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Prometheus Azure AD remote write OAuth client secret exposed via config API

CVE-2026-42151 / GHSA-wg65-39gg-5wfj

More information

Details

Impact

Users who use Azure AD remote write with OAuth authentication are impacted.

The client_secret field in the Azure AD remote write OAuth configuration (storage/remote/azuread) was typed as string instead of Secret. Prometheus redacts fields of type Secret when serving the configuration via the /-/config HTTP API endpoint. Because the field was a plain string, the Azure OAuth client secret was exposed in plaintext to any user or process with access to that endpoint.

Patches

The problem has been patched by changing ClientSecret in OAuthConfig to Secret. Users should upgrade to 3.11.3 or 3.5.3 LTS.

Workarounds

Users who can not upgrade can switch to Managed Identity or Workload Identity authentication for Azure AD remote write, which do not involve a client secret.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Prometheus: Remote read endpoint allows denial of service via crafted snappy payload

CVE-2026-42154 / GHSA-8rm2-7qqf-34qm

More information

Details

Impact

The remote read endpoint (/api/v1/read) does not validate the declared decoded length in a snappy-compressed request body before allocating memory.
An unauthenticated attacker can send a small payload that causes a huge heap allocation per request. Under concurrent load this can exhaust available memory and crash the Prometheus process.

Patches

Has the problem been patched? What versions should users upgrade to?

Fixed in 3.11.3 and 3.5.3 LTS. Users should upgrade to these versions or later.

Workarounds

User who can not upgrade can place Prometheus behind a reverse proxy or firewall that requires authentication before requests reach /api/v1/read.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Prometheus vulnerable to stored XSS via crafted histogram bucket label values in the old web UI heatmap display

GHSA-fw8g-cg8f-9j28

More information

Details

Impact

In the Prometheus server's legacy web UI (enabled via the command-line flag --enable-feature=old-ui), the histogram heatmap chart view does not escape le label values when inserting them into the HTML for use as axis tick mark labels.

An attacker who can inject crafted metrics (e.g. via a compromised scrape target, remote write, or OTLP receiver endpoint) can execute JavaScript in the browser of any Prometheus user who views the metric in the heatmap chart UI. From the XSS context, an attacker could for example:

  • Read /api/v1/status/config to extract sensitive configuration (although credentials / secrets are redacted by the server)
  • Call /-/quit to shut down Prometheus (only if --web.enable-lifecycle is set)
  • Call /api/v1/admin/tsdb/delete_series to delete data (only if --web.enable-admin-api is set)
  • Exfiltrate metric data to an external server

Note that this only affects users who have explicitly enabled the legacy Prometheus web UI using the --enable-feature=old-ui command-line flag.

Patches

A patch is available at https://github.com/prometheus/prometheus/releases/tag/v0.311.3.

Workarounds

If at all possible, disable the legacy web UI by removing the --enable-feature=old-ui command-line flag).

If this is not an option, take the following precautions:

  • If using the remote write receiver (--web.enable-remote-write-receiver), ensure it is not exposed to untrusted sources.
  • If using the OTLP receiver (--web.enable-otlp-receiver), ensure it is not exposed to untrusted sources.
  • Ensure scrape targets are trusted and not under attacker control.
  • Do not enable admin / mutating API endpoints (e.g. --web.enable-admin-api or web.enable-lifecycle) in cases where you cannot prevent untrusted data from being ingested.
  • Users should avoid clicking untrusted links, especially those containing functions such as label_replace, as they may generate poisoned label names and values.
Resources
  • CVE-2019-10215 — prior stored DOM XSS vulnerability in Prometheus query history, fixed in v2.7.2
  • CVE-2026-40179 — prior stored DOM XSS vulnerability in Prometheus web UI (hover tooltips and metrics explorer), fixed in v3.11.2

Severity

Medium

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

prometheus/prometheus (github.com/prometheus/prometheus)

v0.311.3

Compare Source

v0.311.2

Compare Source

v0.311.1

Compare Source

v0.311.0

Compare Source

v0.310.0

Compare Source

v0.309.1

Compare Source

v0.309.0

Compare Source

v0.308.1

Compare Source

v0.308.0

Compare Source

v0.307.3

Compare Source

v0.307.2

Compare Source

v0.307.1

Compare Source

v0.307.0

Compare Source

v0.306.0

Compare Source

v0.305.3

Compare Source

v0.305.2

Compare Source

v0.305.1

Compare Source

v0.305.0

Compare Source

v0.304.2

Compare Source

v0.304.1

Compare Source

v0.304.0

Compare Source

v0.303.1

Compare Source

v0.303.0

Compare Source

v0.302.1

Compare Source

v0.302.0

Compare Source

v0.301.0

Compare Source

v0.300.1

Compare Source

v0.300.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented Apr 17, 2026

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 31 additional dependencies were updated

Details:

Package Change
github.com/fsnotify/fsnotify v1.7.0 -> v1.9.0
github.com/google/go-querystring v1.1.0 -> v1.2.0
github.com/hashicorp/go-version v1.7.0 -> v1.8.0
github.com/prometheus/common v0.59.1 -> v0.67.5
golang.org/x/oauth2 v0.27.0 -> v0.36.0
k8s.io/client-go v0.31.14 -> v0.35.3
github.com/Microsoft/go-winio v0.6.1 -> v0.6.2
github.com/edsrzf/mmap-go v1.1.0 -> v1.2.0
github.com/fxamacker/cbor/v2 v2.7.0 -> v2.9.0
github.com/grafana/regexp v0.0.0-20240518133315-a468a5bfb3bc -> v0.0.0-20250905093917-f7b3be9d1853
github.com/modern-go/reflect2 v1.0.2 -> v1.0.3-0.20250322232337-35a7c28c31ee
github.com/prometheus/client_golang v1.20.3 -> v1.23.2
github.com/prometheus/client_model v0.6.1 -> v0.6.2
github.com/prometheus/procfs v0.15.1 -> v0.16.1
github.com/spf13/pflag v1.0.5 -> v1.0.10
go.opentelemetry.io/otel v1.29.0 -> v1.42.0
go.opentelemetry.io/otel/metric v1.29.0 -> v1.42.0
go.opentelemetry.io/otel/trace v1.29.0 -> v1.42.0
golang.org/x/arch v0.8.0 -> v0.8.0
golang.org/x/crypto v0.45.0 -> v0.49.0
golang.org/x/net v0.47.0 -> v0.52.0
golang.org/x/sys v0.38.0 -> v0.42.0
golang.org/x/term v0.37.0 -> v0.41.0
golang.org/x/text v0.31.0 -> v0.35.0
golang.org/x/time v0.6.0 -> v0.15.0
google.golang.org/protobuf v1.34.2 -> v1.36.11
k8s.io/apimachinery v0.31.14 -> v0.35.3
k8s.io/klog/v2 v2.130.1 -> v2.140.0
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 -> v0.0.0-20251002143259-bc988d571ff4
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd -> v0.0.0-20250730193827-2d320260d730
sigs.k8s.io/yaml v1.4.0 -> v1.6.0

@ti-chi-bot ti-chi-bot Bot requested a review from liubog2008 April 17, 2026 22:53
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Apr 17, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign liubog2008 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

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

Details Needs approval from an approver in each of these files:

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

@ti-chi-bot ti-chi-bot Bot added the size/XL label Apr 17, 2026
@renovate renovate Bot force-pushed the renovate/go-github.com-prometheus-prometheus-vulnerability branch from 85a4b96 to 7af3dc5 Compare April 29, 2026 10:48
@renovate renovate Bot changed the title fix(deps): update module github.com/prometheus/prometheus to v0.311.2 [security] fix(deps): update module github.com/prometheus/prometheus to v0.311.3 [security] May 6, 2026
@renovate renovate Bot force-pushed the renovate/go-github.com-prometheus-prometheus-vulnerability branch from 7af3dc5 to aab99e9 Compare May 6, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants