Skip to content

fix(deps): update module github.com/prometheus/prometheus to v0.311.2 [security] (release-v2.8)#6955

Open
renovate-sh-app[bot] wants to merge 1 commit intorelease-v2.8from
renovate/release-v2.8-go-github.tiyicn.workers.dev-prometheus-prometheus-vulnerability
Open

fix(deps): update module github.com/prometheus/prometheus to v0.311.2 [security] (release-v2.8)#6955
renovate-sh-app[bot] wants to merge 1 commit intorelease-v2.8from
renovate/release-v2.8-go-github.tiyicn.workers.dev-prometheus-prometheus-vulnerability

Conversation

@renovate-sh-app
Copy link
Copy Markdown
Contributor

@renovate-sh-app renovate-sh-app Bot commented Apr 13, 2026

This PR contains the following updates:

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

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

BIT-prometheus-2026-40179 / 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


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • 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

Need help?

You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.

@renovate-sh-app renovate-sh-app Bot added dependencies Pull requests that update a dependency file gomod minor renovate Applied to PR's created by renovatebot security update-minor labels Apr 13, 2026
@renovate-sh-app renovate-sh-app Bot enabled auto-merge (squash) April 13, 2026 17:53
@renovate-sh-app
Copy link
Copy Markdown
Contributor Author

renovate-sh-app Bot commented Apr 13, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: go get -t ./...
go: downloading github.com/jaegertracing/jaeger v1.67.0
go: downloading github.com/jsternberg/zap-logfmt v1.2.0
go: downloading github.com/grafana/e2e v0.1.1
go: downloading github.com/spf13/viper v1.20.1
go: downloading go.opentelemetry.io/contrib/exporters/autoexport v0.61.0
go: downloading go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0
go: downloading go.opentelemetry.io/otel/bridge/opencensus v1.35.0
go: downloading github.com/go-logfmt/logfmt v0.6.0
go: downloading go.opentelemetry.io/otel/bridge/opentracing v1.35.0
go: downloading github.com/alecthomas/kong v1.10.0
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.124.1
go: downloading go.opentelemetry.io/collector/pdata v1.54.0
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.124.1
go: downloading go.opentelemetry.io/collector/component v1.54.0
go: downloading go.opentelemetry.io/collector/component/componenttest v0.148.0
go: downloading github.com/jedib0t/go-pretty/v6 v6.6.7
go: downloading go.opentelemetry.io/collector/config/configgrpc v0.124.0
go: downloading go.opentelemetry.io/collector v0.124.0
go: downloading go.opentelemetry.io/collector/config/configtls v1.30.0
go: downloading go.opentelemetry.io/collector/config/confighttp v0.124.0
go: downloading go.opentelemetry.io/collector/exporter v0.124.0
go: downloading github.com/olekukonko/tablewriter v0.0.5
go: downloading go.opentelemetry.io/collector/exporter/otlpexporter v0.124.0
go: downloading github.com/parquet-go/parquet-go v0.25.1-0.20250428214007-401fed3de956
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0
go: downloading github.com/stoewer/parquet-cli v0.0.10
go: downloading github.com/willf/bloom v2.0.3+incompatible
go: downloading google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9
go: downloading github.com/twmb/franz-go/pkg/kadm v1.16.0
go: downloading google.golang.org/genproto v0.0.0-20260217215200-42d3e9bedb6d
go: downloading github.com/prometheus/statsd_exporter v0.26.1
go: downloading github.com/twmb/franz-go v1.18.1
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.124.1
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.124.1
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.124.1
go: downloading go.opentelemetry.io/collector/consumer v1.54.0
go: downloading github.com/twmb/franz-go/pkg/kmsg v1.11.2
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.124.1
go: downloading go.opentelemetry.io/collector/processor v1.54.0
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.124.1
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.124.1
go: downloading go.opentelemetry.io/collector/client v1.30.0
go: downloading github.com/twmb/franz-go/pkg/kfake v0.0.0-20250320172111-35ab5e5f5327
go: downloading go.opentelemetry.io/collector/confmap v1.54.0
go: downloading go.opentelemetry.io/collector/exporter/exportertest v0.124.0
go: downloading go.opentelemetry.io/collector/otelcol v0.124.0
go: downloading go.opentelemetry.io/collector/receiver v1.30.0
go: downloading go.opentelemetry.io/collector/receiver/otlpreceiver v0.124.0
go: downloading github.com/uber-go/atomic v1.4.0
go: downloading go.opentelemetry.io/collector/config/configopaque v1.30.0
go: downloading go.opentelemetry.io/collector/exporter/otlphttpexporter v0.124.0
go: downloading go.opentelemetry.io/collector/pdata/testdata v0.148.0
go: downloading github.com/grafana/gomemcache v0.0.0-20251008140118-65a671e12fdf
go: downloading github.com/sony/gobreaker v0.4.1
go: downloading github.com/alicebob/miniredis/v2 v2.34.0
go: downloading github.com/jaegertracing/jaeger-idl v0.5.0
go: downloading github.com/prometheus/procfs v0.16.1
go: downloading github.com/sagikazarmark/locafero v0.7.0
go: downloading go.opentelemetry.io/contrib/bridges/prometheus v0.61.0
go: downloading go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.36.0
go: downloading go.opentelemetry.io/otel/exporters/prometheus v0.58.0
go: downloading go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0
go: downloading go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.36.0
go: downloading go.opencensus.io v0.24.0
go: downloading github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.1
go: downloading cloud.google.com/go/storage v1.56.0
go: downloading github.com/googleapis/gax-go/v2 v2.18.0
go: downloading google.golang.org/api v0.272.0
go: downloading github.com/aws/aws-sdk-go v1.55.7
go: downloading cloud.google.com/go v0.121.6
go: downloading github.com/minio/minio-go/v7 v7.0.91
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.124.1
go: downloading go.opentelemetry.io/collector/config/configretry v1.30.0
go: downloading go.opentelemetry.io/collector/consumer/consumererror v0.124.0
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.124.1
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/pkg/core/xidutils v0.124.1
go: downloading go.opentelemetry.io/collector/semconv v0.124.0
go: downloading go.opentelemetry.io/collector/config/configauth v0.124.0
go: downloading go.opentelemetry.io/collector/config/configcompression v1.30.0
go: downloading go.opentelemetry.io/collector/extension/extensionauth v1.30.0
go: downloading go.opentelemetry.io/collector/extension v1.30.0
go: downloading go.opentelemetry.io/collector/config/confignet v1.30.0
go: downloading github.com/mattn/go-runewidth v0.0.16
go: downloading github.com/spaolacci/murmur3 v1.1.0
go: downloading github.com/willf/bitset v1.1.11
go: downloading go.opentelemetry.io/collector/pipeline v1.54.0
go: downloading go.opentelemetry.io/collector/exporter/exporterhelper/xexporterhelper v0.124.0
go: downloading go.opentelemetry.io/collector/exporter/xexporter v0.124.0
go: downloading go.opentelemetry.io/collector/pdata/pprofile v0.148.0
go: downloading github.com/apache/thrift v0.21.0
go: downloading go.opentelemetry.io/collector/component/componentstatus v0.148.0
go: downloading go.opentelemetry.io/collector/featuregate v1.54.0
go: downloading go.opentelemetry.io/collector/receiver/receiverhelper v0.124.0
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.124.1
go: downloading go.opentelemetry.io/collector/processor/processorhelper v0.124.0
go: downloading go.opentelemetry.io/collector/internal/componentalias v0.148.0
go: downloading golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa
go: downloading github.com/IBM/sarama v1.45.1
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.124.1
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.124.1
go: downloading github.com/census-instrumentation/opencensus-proto v0.4.1
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.124.1
go: downloading go.opentelemetry.io/collector/consumer/consumertest v0.148.0
go: downloading go.opentelemetry.io/collector/receiver/receivertest v0.124.0
go: downloading github.com/spf13/cobra v1.9.1
go: downloading go.opentelemetry.io/collector/confmap/xconfmap v0.148.0
go: downloading go.opentelemetry.io/collector/connector v0.124.0
go: downloading go.opentelemetry.io/collector/service v0.124.0
go: downloading go.opentelemetry.io/collector/consumer/xconsumer v0.148.0
go: downloading go.opentelemetry.io/collector/internal/sharedcomponent v0.124.0
go: downloading go.opentelemetry.io/collector/internal/telemetry v0.124.0
go: downloading go.opentelemetry.io/collector/receiver/xreceiver v0.124.0
go: downloading github.com/oklog/ulid v1.3.1
go: downloading go.opentelemetry.io/contrib/propagators/jaeger v1.35.0
go: downloading go.opentelemetry.io/contrib/samplers/jaegerremote v0.30.0
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading github.com/sourcegraph/conc v0.3.0
go: downloading github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302
go: downloading cloud.google.com/go/auth v0.18.2
go: downloading cloud.google.com/go/iam v1.5.3
go: downloading github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0
go: downloading go.opentelemetry.io/contrib/detectors/gcp v1.39.0
go: downloading github.com/minio/crc64nvme v1.0.1
go: downloading github.com/rivo/uniseg v0.4.7
go: downloading go.opentelemetry.io/collector/consumer/consumererror/xconsumererror v0.124.0
go: downloading go.opentelemetry.io/collector/pipeline/xpipeline v0.124.0
go: downloading github.com/hashicorp/go-version v1.8.0
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.148.0
go: downloading github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3
go: downloading github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
go: downloading github.com/aws/aws-msk-iam-sasl-signer-go v1.0.1
go: downloading github.com/xdg-go/scram v1.1.2
go: downloading github.com/relvacode/iso8601 v1.6.0
go: downloading github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.124.1
go: downloading k8s.io/client-go v0.25.0
go: downloading github.com/knadh/koanf v1.5.0
go: downloading github.com/knadh/koanf/v2 v2.3.3
go: downloading go.opentelemetry.io/collector/internal/fanoutconsumer v0.124.0
go: downloading go.opentelemetry.io/collector/config/configtelemetry v0.124.0
go: downloading go.opentelemetry.io/contrib/otelconf v0.15.0
go: downloading go.opentelemetry.io/contrib/bridges/otelzap v0.10.0
go: downloading go.opentelemetry.io/contrib/propagators/b3 v1.35.0
go: downloading github.com/buger/jsonparser v1.1.1
go: downloading golang.org/x/tools v0.42.0
go: downloading github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0
go: downloading github.com/klauspost/cpuid/v2 v2.2.10
go: downloading go.opentelemetry.io/collector/extension/xextension v0.124.0
go: downloading github.com/expr-lang/expr v1.17.7
go: downloading github.com/antchfx/xmlquery v1.4.4
go: downloading github.com/ua-parser/uap-go v0.0.0-20241012191800-bbb40edc15aa
go: downloading go.opentelemetry.io/collector/extension/extensioncapabilities v0.124.0
go: downloading go.opentelemetry.io/collector/connector/connectortest v0.124.0
go: downloading go.opentelemetry.io/collector/connector/xconnector v0.124.0
go: downloading go.opentelemetry.io/collector/extension/extensiontest v0.124.0
go: downloading go.opentelemetry.io/collector/processor/processortest v0.148.0
go: downloading go.opentelemetry.io/collector/processor/xprocessor v0.148.0
go: downloading go.opentelemetry.io/collector/service/hostcapabilities v0.124.0
go: downloading github.com/shirou/gopsutil/v4 v4.25.3
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/gorilla/handlers v1.5.2
go: downloading github.com/elastic/lunes v0.1.0
go: downloading github.com/go-openapi/swag/conv v0.25.4
go: downloading github.com/go-openapi/swag/fileutils v0.25.4
go: downloading github.com/go-openapi/swag/jsonutils v0.25.4
go: downloading github.com/go-openapi/swag/loading v0.25.4
go: downloading github.com/go-openapi/swag/mangling v0.25.4
go: downloading github.com/go-openapi/swag/stringutils v0.25.4
go: downloading github.com/go-openapi/swag/typeutils v0.25.4
go: downloading github.com/go-openapi/swag/yamlutils v0.25.4
go: downloading golang.org/x/mod v0.33.0
go: downloading github.com/tklauser/go-sysconf v0.3.14
go: downloading github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683
go: downloading github.com/ebitengine/purego v0.8.2
go: downloading github.com/tklauser/numcpus v0.8.0
go: github.com/grafana/tempo/modules/generator/storage imports
	github.com/prometheus/prometheus/tsdb/errors: cannot find module providing package github.com/prometheus/prometheus/tsdb/errors
go: module github.com/aws/aws-sdk-go is deprecated: aws-sdk-go is deprecated. Use aws-sdk-go-v2.
go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.
go: module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver is deprecated: this receiver is no longer maintained and has reached end-of-life. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/36791

@renovate-sh-app renovate-sh-app Bot force-pushed the renovate/release-v2.8-go-github.tiyicn.workers.dev-prometheus-prometheus-vulnerability branch 6 times, most recently from bedbb5a to 9c1efdf Compare April 24, 2026 14:07
… [security]

| datasource | package                          | from     | to       |
| ---------- | -------------------------------- | -------- | -------- |
| go         | github.com/prometheus/prometheus | v0.303.1 | v0.311.2 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
@renovate-sh-app renovate-sh-app Bot force-pushed the renovate/release-v2.8-go-github.tiyicn.workers.dev-prometheus-prometheus-vulnerability branch from 9c1efdf to 70b3060 Compare April 24, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file gomod minor renovate Applied to PR's created by renovatebot security update-minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants