Skip to content

chore(deps): update module github.com/prometheus/prometheus to v0.311.2 [security]#8

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

chore(deps): update module github.com/prometheus/prometheus to v0.311.2 [security]#8
renovate[bot] wants to merge 1 commit intomainfrom
renovate.go-github.com-prometheus-prometheus-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Apr 13, 2026

This PR contains the following updates:

Package Change Age Confidence
github.com/prometheus/prometheus v0.41.0v0.311.2 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 OSV and the GitHub Advisory Database (CC-BY 4.0).


Release Notes

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

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

v0.55.1

Compare Source

v0.55.0

Compare Source

v0.54.1

Compare Source

v0.54.0

Compare Source

v0.53.4

Compare Source

v0.53.3

Compare Source

v0.53.2

Compare Source

v0.53.1

Compare Source

v0.53.0

Compare Source

v0.52.1

Compare Source

v0.52.0

Compare Source

v0.51.2

Compare Source

v0.51.1

Compare Source

v0.51.0

Compare Source

v0.50.1

Compare Source

v0.50.0

Compare Source

v0.49.1

Compare Source

v0.49.0

Compare Source

v0.48.1

Compare Source

v0.48.0

Compare Source

v0.47.2

Compare Source

v0.47.1

Compare Source

v0.47.0

Compare Source

v0.46.0

Compare Source

v0.45.6

Compare Source

v0.45.5

Compare Source

v0.45.4

Compare Source

v0.45.3

Compare Source

v0.45.2

Compare Source

v0.45.1

Compare Source

v0.45.0

Compare Source

v0.44.0

Compare Source

v0.43.1

Compare Source

v0.43.0

Compare Source

v0.42.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 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
Copy link
Copy Markdown
Contributor Author

renovate bot commented Apr 13, 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):

  • 22 additional dependencies were updated

Details:

Package Change
cloud.google.com/go/auth v0.17.0 -> v0.18.2
github.com/golang-jwt/jwt/v5 v5.3.0 -> v5.3.1
github.com/googleapis/enterprise-certificate-proxy v0.3.7 -> v0.3.14
github.com/googleapis/gax-go/v2 v2.15.0 -> v2.18.0
github.com/prometheus/common v0.67.4 -> v0.67.5
go.opentelemetry.io/otel v1.38.0 -> v1.42.0
go.opentelemetry.io/otel/metric v1.38.0 -> v1.42.0
go.opentelemetry.io/otel/trace v1.38.0 -> v1.42.0
go.yaml.in/yaml/v2 v2.4.3 -> v2.4.4
golang.org/x/crypto v0.45.0 -> v0.49.0
golang.org/x/net v0.47.0 -> v0.52.0
golang.org/x/oauth2 v0.33.0 -> v0.36.0
golang.org/x/sync v0.18.0 -> v0.20.0
golang.org/x/sys v0.38.0 -> v0.42.0
golang.org/x/text v0.31.0 -> v0.35.0
golang.org/x/time v0.14.0 -> v0.15.0
google.golang.org/api v0.256.0 -> v0.272.0
google.golang.org/genproto v0.0.0-20251111163417-95abcf5c77ba -> v0.0.0-20260217215200-42d3e9bedb6d
google.golang.org/genproto/googleapis/api v0.0.0-20251111163417-95abcf5c77ba -> v0.0.0-20260319201613-d00831a3d3e7
google.golang.org/genproto/googleapis/rpc v0.0.0-20251111163417-95abcf5c77ba -> v0.0.0-20260311181403-84a4fc48630c
google.golang.org/grpc v1.77.0 -> v1.79.3
google.golang.org/protobuf v1.36.10 -> v1.36.11

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.

0 participants