# CVE-2026-40179: Prometheus: Stored XSS via metric names and label values in web UI tooltips and metrics explorer

- Severity: Medium 5.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 27% of CVEs (2026-12-01)
- Published: 2026-04-13T16:39:16.000Z
- Modified: 2026-10-06T19:00:43.118Z
- Also known as: GHSA-vffh-x6r8-xx99, BIT-PROMETHEUS-2026-40179, GO-2026-5662
- Related: CGA-j4ph-g7ff-g67c
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- prometheus prometheus: >= 3.0.0, < 3.5.2; >= 3.6.0, < 3.11.2; < 0.311.2-0.20260410083055-07c6232d159b; from 3.0.0 before 3.5.2; from 3.6.0 before 3.11.2
- github.com/prometheus/prometheus (Go): from 3.0.0 before 3.5.2; from 3.6.0 before 3.11.2; before 0.311.2-0.20260410083055-07c6232d159b
- prometheus (Bitnami): before 0.305.2; from 0.306.0 before 0.311.2; from 1.0.0 before 3.5.2; from 3.6.0 before 3.11.2

## Every score

- GitHub_M: CVSS:4.0 5.3 Medium `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: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99> (advisory, mitigation, vendor-advisory, web)
- <https://github.com/prometheus/prometheus/pull/18506> (fix, issue-tracking, patch, web)
- <https://github.com/prometheus/prometheus/commit/07c6232d159bfb474a077788be184d87adcfac3c> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40179> (advisory, web)
- <https://github.com/prometheus/prometheus> (package)

## Sources

- CVE List: [CVE-2026-40179](https://www.cve.org/CVERecord?id=CVE-2026-40179), CVE Terms of Use, modified 2026-04-16
- GitHub Advisory Database: [GHSA-vffh-x6r8-xx99](https://github.com/advisories/GHSA-vffh-x6r8-xx99), CC-BY-4.0, modified 2026-10-06
- Go Vulnerability Database: [GO-2026-5662](https://pkg.go.dev/vuln/GO-2026-5662), CC-BY-4.0, modified 2026-07-15
- NVD: [CVE-2026-40179](https://nvd.nist.gov/vuln/detail/CVE-2026-40179), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-PROMETHEUS-2026-40179](https://osv.dev/vulnerability/BIT-PROMETHEUS-2026-40179), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2026-40179 · Whole record: https://cve.day/CVE-2026-40179.json · Rebuilt by cve.day 2026-11-25T22:59:18.880Z
