CVE-2026-40179: github.com/prometheus/prometheus · Prometheus has Stored XSS via metric names and label values in Prometheus web UI tooltips and metrics explorer
Affects github.com/prometheus/prometheusSource GCVE Database
Not known to be exploited · CVSS 6.1 Medium : upgrade to 0.311.2-0.20260410083055-07c6232d159b when convenient.
Data as of 28 Nov 2026, 18:37 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 24% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.11.2, 3.5.2, 0.311.2 +2
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 13 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 29 Nov 2026.
What to do
Upgrade github.com/prometheus/prometheus to 0.311.2-0.20260410083055-07c6232d159b; prometheus to 3.11.2, 3.5.2, 0.311.2 or 0.305.2.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Bitnamiprometheuspkg:bitnami/prometheusOther threats | Affected
| Fixed in
|
| Gogithub.com/prometheus/prometheus | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A fix is available in Prometheus versions 3.5.2 and 3.11.2. Users should upgrade to these or later versions to remediate the vulnerability. Additional mitigations include restricting exposure of remote write and OTLP receivers, trusting scrape targets, disabling administrative or mutating API endpoints in untrusted environments, and avoiding untrusted links that may generate poisoned labels.
Description
Prometheus versions prior to 3.5.2 and between 3.6.0 and 3.11.1 have stored cross-site scripting (XSS) vulnerabilities in their web UI. These arise from improper escaping of metric names and label values injected into innerHTML in UI components like chart tooltips and the Metric Explorer fuzzy search. An attacker who can inject metrics via compromised scrape targets or receivers may execute arbitrary JavaScript in users' browsers. This could lead to configuration exfiltration, data deletion, or service shutdown depending on enabled features. The vulnerabilities are fixed in versions 3.5.2 and 3.11.2. Mitigations include restricting exposure of remote write and OTLP receivers, trusting scrape targets, disabling admin or mutating API endpoints in untrusted environments, and avoiding untrusted links that generate poisoned labels.
References
- github.com/prometheus/prometheus/commit/07c6232d159bfb474a077788be184d87adcfac3c (opens in a new tab)
- github.com/prometheus/prometheus/pull/18506 (opens in a new tab)
- github.com/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-40179 (opens in a new tab)
- github.com/prometheus/prometheus (opens in a new tab)