CVE-2026-40179 json
Prometheus: Stored XSS via metric names and label values in web UI tooltips and metrics explorer
published 2026-04-13 6 mo ago modified 2026-10-06 33 d ago also BIT-prometheus-2026-40179 , EUVD-2026-23123 , GHSA-vffh-x6r8-xx99 , GO-2026-5662
- cvss
- 6.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 24%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/prometheus/prometheus 0.311.2-0.20260410083055-07c6232d159b, 3.5.2, 3.11.2
- bitnami prometheus 0.305.2, 0.311.2, 3.5.2, 3.11.2
- prometheus prometheus 0.305.2, 0.311.2, 3.5.2, 3.11.2
- uyuni-tools Multi-Linux Manager Server Extension for SLE 5.1, Multi-Linux Manager Proxy Extension for SLE 5.1 5.1.29-150700.3.26.1
- suse-multi-linux-manager-5.1-s390x-server-image Multi-Linux Manager Server Extension for SLE 5.1 5.1.4-8.20.34
- suse-multi-linux-manager-5.1-x86_64-server-image Multi-Linux Manager Server Extension for SLE 5.1 5.1.4-8.20.34
- suse-multi-linux-manager-5.1-aarch64-server-image Multi-Linux Manager Server Extension for SLE 5.1 5.1.4-8.20.34
- suse-multi-linux-manager-5.1-ppc64le-server-image Multi-Linux Manager Server Extension for SLE 5.1 5.1.4-8.20.34
- suse-multi-linux-manager-5.1-s390x-proxy-ssh-image Multi-Linux Manager Proxy Extension for SLE 5.1 5.1.4-8.20.12
- suse-multi-linux-manager-5.1-x86_64-proxy-ssh-image Multi-Linux Manager Proxy Extension for SLE 5.1 5.1.4-8.20.12
- suse-multi-linux-manager-5.1-aarch64-proxy-ssh-image Multi-Linux Manager Proxy Extension for SLE 5.1 5.1.4-8.20.12
suse advisories SUSE-SU-2026:2774-1SUSE-SU-2026:2768-1
- govulncheck-vulndb openSUSE Leap 16.0 0.0.20260723T184607-160000.1.1
- golang-github-prometheus-prometheus openSUSE Tumbleweed 3.11.2-1.1
opensuse advisories openSUSE-SU-2026:21483-1openSUSE-SU-2026:10607-1
- prometheus Alpine 3.24, Alpine 3.23 3.5.3-r0
alpine advisories ALPINE-CVE-2026-40179
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/prometheus/prometheus@07c6232 commit
- github.com/prometheus/prometheus#18506 pull request
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 6 mo ago
Exploit prediction
0.31% chance of exploitation in the next 30 days, higher than 24% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.3 | 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 |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| CNA | 4.0 | 5.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/prometheus/prometheus | >=3.0.0, <3.5.2 >=3.6.0, <3.11.2 <0.311.2-0.20260410083055-07c6232d159b |
3.5.2 3.11.2 0.311.2-0.20260410083055-07c6232d159b |
| bitnami | prometheus | <0.305.2 >=0.306.0, <0.311.2 >=1.0.0, <3.5.2 >=3.6.0, <3.11.2 |
0.305.2 0.311.2 3.5.2 3.11.2 |
Affected products
- prometheus prometheus
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/prometheus/prometheus/pull/18506
web, issue-tracking, patch
-
github.com
/prometheus/prometheus/commit/07c6232d159bfb474a077788be184d87adcfac3c
web, patch
-
github.com
/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99
web, mitigation, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-40179
advisory, web
-
github.com
/prometheus/prometheus
package
Sources
- CVE List CVE-2026-40179
- GitHub Advisory GHSA-vffh-x6r8-xx99
- NVD CVE-2026-40179
- OSV BIT-prometheus-2026-40179
- OSV GO-2026-5662
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Support weird prometheus go-module version nonsense.