CVE-2026-40179Prometheus: Stored XSS via metric names and label values in web UI tooltips and metrics…
Prometheus is an open-source monitoring system and time series database. Versions 3.0 through 3.5.1 and 3.6.0 through 3.11.1 have stored cross-site scripting vulnerabilities in multiple components of the Prometheus web UI where metric names and label values are injected into innerHTML without escaping. In both the Mantine UI and old React UI, chart tooltips on the Graph page render metric names containing HTML/JavaScript without sanitization. In the old React UI, the Metric Explorer fuzzy search results use dangerouslySetInnerHTML without escaping, and heatmap cell tooltips interpolate le label values without sanitization. With Prometheus v3.x defaulting to UTF-8 metric and label name validation, characters like <, >, and " are now valid in metric names and labels. An attacker who can inject metrics via a compromised scrape target, remote write, or OTLP receiver endpoint can execute arbitrary JavaScript in the browser of any Prometheus user who views the metric in the Graph UI, potentially enabling configuration exfiltration, data deletion, or Prometheus shutdown depending on enabled flags. This issue has been fixed in versions 3.5.2 and 3.11.2. If developers are unable to immediately update, the following workarounds are recommended: ensure that the remote write receiver (--web.enable-remote-write-receiver) and the OTLP receiver (--web.enable-otlp-receiver) are not exposed to untrusted sources; verify that all scrape targets are trusted and not under attacker control; avoid enabling admin or mutating API endpoints (e.g., --web.enable-admin-api or --web.enable-lifecycle) in environments where untrusted data may be ingested; and refrain from clicking untrusted links, particularly those containing functions such as label_replace, as they may generate poisoned label names and values.
What to do
Fixed builds are available from Alpine, Go: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | prometheus | Fix pending | UBUNTU-CVE-2026-40179 | |
| Ubuntu 26.04 | prometheus | Fix pending | UBUNTU-CVE-2026-40179 | |
| Ubuntu 25.10 | prometheus | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-40179 | |
| Ubuntu 24.04 | prometheus | Fix pending | UBUNTU-CVE-2026-40179 | |
| Ubuntu 22.04 | prometheus | Fix pending | UBUNTU-CVE-2026-40179 | |
| Ubuntu 20.04 | prometheus | Fix pending | UBUNTU-CVE-2026-40179 | |
| Ubuntu 18.04 | prometheus | Fix pending | UBUNTU-CVE-2026-40179 | |
| Ubuntu 16.04 | prometheus | Fix pending | UBUNTU-CVE-2026-40179 | |
| Alpine Linux 3.24 | prometheus | Fixed | 3.5.3-r0 | ALPINE-CVE-2026-40179 |
| Alpine Linux 3.23 | prometheus | Fixed | 3.5.3-r0 | ALPINE-CVE-2026-40179 |
| Go library | github.com/prometheus/prometheus | Fixed | 3.11.2 | GHSA-vffh-x6r8-xx99 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- prometheus: affected: >= 3.0.0, < 3.5.2, >= 3.6.0, < 3.11.2, < 0.311.2-0.20260410083055-07c6232d159b
References
- https://github.com/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99
- https://github.com/prometheus/prometheus/pull/18506
- https://github.com/prometheus/prometheus/commit/07c6232d159bfb474a077788be184d87adcfac3c
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.