Skip to content

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

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/go-github.qkg1.top-prometheus-prometheus-vulnerability
Open

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

Conversation

@renovate

@renovate renovate Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

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

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


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 vulnerable to stored XSS via crafted histogram bucket label values in the old web UI heatmap display

CVE-2026-44903 / 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

prometheus/prometheus@38f23b9

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.
References
  • 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

  • CVSS Score: 5.1 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/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: 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).


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


Configuration

📅 Schedule: (UTC)

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

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, 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

renovate Bot commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

ℹ️ 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):

  • 35 additional dependencies were updated

Details:

Package Change
k8s.io/api v0.35.2 -> v0.35.3
github.com/go-openapi/swag/cmdutils v0.24.0 -> v0.25.4
github.com/go-openapi/swag/netutils v0.24.0 -> v0.25.4
cel.dev/expr v0.24.0 -> v0.25.1
github.com/coreos/go-systemd/v22 v22.5.0 -> v22.6.0
github.com/go-openapi/strfmt v0.26.0 -> v0.26.1
github.com/go-openapi/swag v0.24.1 -> v0.25.4
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 -> v2.28.0
github.com/klauspost/compress v1.18.2 -> v1.18.5
github.com/prometheus/alertmanager v0.28.0 -> v0.31.1
github.com/sirupsen/logrus v1.9.3 -> v1.9.4
go.mongodb.org/mongo-driver v1.14.0 -> v1.17.6
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.64.0 -> v0.67.0
go.opentelemetry.io/otel v1.41.0 -> v1.42.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.39.0 -> v1.42.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.36.0 -> v1.42.0
go.opentelemetry.io/otel/metric v1.41.0 -> v1.42.0
go.opentelemetry.io/otel/sdk v1.41.0 -> v1.42.0
go.opentelemetry.io/otel/trace v1.41.0 -> v1.42.0
go.yaml.in/yaml/v2 v2.4.3 -> v2.4.4
golang.org/x/crypto v0.48.0 -> v0.49.0
golang.org/x/exp v0.0.0-20251002181428-27f1f14c8bb9 -> v0.0.0-20260218203240-3dfff04db8fa
golang.org/x/mod v0.32.0 -> v0.33.0
golang.org/x/net v0.51.0 -> v0.52.0
golang.org/x/oauth2 v0.34.0 -> v0.36.0
golang.org/x/sync v0.19.0 -> v0.20.0
golang.org/x/sys v0.41.0 -> v0.42.0
golang.org/x/term v0.40.0 -> v0.41.0
golang.org/x/text v0.34.0 -> v0.35.0
golang.org/x/time v0.14.0 -> v0.15.0
golang.org/x/tools v0.41.0 -> v0.42.0
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 -> v0.0.0-20260319201613-d00831a3d3e7
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 -> v0.0.0-20260311181403-84a4fc48630c
google.golang.org/grpc v1.78.0 -> v1.79.3
k8s.io/apimachinery v0.35.2 -> v0.35.3

@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.2 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot deleted the renovate/go-github.qkg1.top-prometheus-prometheus-vulnerability branch April 27, 2026 18:35
@renovate renovate Bot changed the title fix(deps): update module github.com/prometheus/prometheus to v0.311.2 [security] - autoclosed fix(deps): update module github.com/prometheus/prometheus to v0.311.2 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate renovate Bot force-pushed the renovate/go-github.qkg1.top-prometheus-prometheus-vulnerability branch from bc2ac65 to b62e16f Compare April 27, 2026 22:04
@renovate renovate Bot force-pushed the renovate/go-github.qkg1.top-prometheus-prometheus-vulnerability branch from b62e16f to 8f3cd39 Compare May 6, 2026 12:59
@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.qkg1.top-prometheus-prometheus-vulnerability branch from 8f3cd39 to 26daea4 Compare June 12, 2026 18:15
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.

0 participants