Prometheus: Stored XSS via metric names and label values in web UI tooltips and metrics explorer
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| prometheus | prometheus | 3.0.0 to before 3.5.2; 3.6.0 to before 3.11.2; before 0.311.2-0.20260410083055-07c6232d159b | 3.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159b | Patch available | CNA |
| — | github.com/prometheus/prometheus (Go) | 3.0.0 to before 3.5.2 | 3.5.2 | Patch available | GHSA-vffh-x6r8-xx99 |
| — | github.com/prometheus/prometheus (Go) | 3.6.0 to before 3.11.2 | 3.11.2 | Patch available | GHSA-vffh-x6r8-xx99 |
| — | github.com/prometheus/prometheus (Go) | before 0.311.2-0.20260410083055-07c6232d159b | 0.311.2-0.20260410083055-07c6232d159b | Patch available | GHSA-vffh-x6r8-xx99 |
- prometheus Vendorprometheus Affected 3.0.0 to before 3.5.2; 3.6.0 to before 3.11.2; before 0.311.2-0.20260410083055-07c6232d159b Fixed in 3.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159b Patch available CNA
- github.com/prometheus/prometheus (Go) Vendor— Affected 3.0.0 to before 3.5.2 Fixed in 3.5.2 Patch available GHSA-vffh-x6r8-xx99
- github.com/prometheus/prometheus (Go) Vendor— Affected 3.6.0 to before 3.11.2 Fixed in 3.11.2 Patch available GHSA-vffh-x6r8-xx99
- github.com/prometheus/prometheus (Go) Vendor— Affected before 0.311.2-0.20260410083055-07c6232d159b Fixed in 0.311.2-0.20260410083055-07c6232d159b Patch available GHSA-vffh-x6r8-xx99
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:prometheus:prometheus:*:*:*:*:*:*:*:* | 3.0.0 to before 3.5.2; 3.6.0 to before 3.11.2 | Vulnerable | prometheus |
- cpe:2.3:a:prometheus:prometheus:*:*:*:*:*:*:*:* Versions 3.0.0 to before 3.5.2; 3.6.0 to before 3.11.2 Vulnerable ·prometheus
Remediation
- Fix · CNA prometheus (prometheus) Fixed in 3.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159b
- Fix · GHSA-vffh-x6r8-xx99 github.com/prometheus/prometheus (Go) Fixed in 3.5.2 Advisory →
- Fix · GHSA-vffh-x6r8-xx99 github.com/prometheus/prometheus (Go) Fixed in 3.11.2 Advisory →
- Fix · GHSA-vffh-x6r8-xx99 github.com/prometheus/prometheus (Go) Fixed in 0.311.2-0.20260410083055-07c6232d159b Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40179
- 2026-10-03 Alias added: GHSA-vffh-x6r8-xx99
- 2026-10-06 Fix available: Go/github.com/prometheus/[email protected], Go/github.com/prometheus/[email protected] · GHSA-vffh-x6r8-xx99
References
Patch 2
Advisory 2
More Prometheus vulnerabilities
- TI-2021-10330 Arbitrary redirects under /new endpoint CVSS 3.1MEDIUM 6.5
- TI-2026-30483 Prometheus: remote read endpoint allows denial of service via crafted snappy payload CVSS 3.1HIGH 7.5
- TI-2026-30481 Prometheus Azure AD remote write OAuth client secret exposed via config API CVSS 3.1HIGH 7.5
- TI-2019-02838 Cross-site scripting in [UNKNOWN] prometheus CVSS 3.0MEDIUM 6.1
- TI-2026-32778 Prometheus: Stored XSS via crafted histogram bucket label values in the heatmap display of the old Prometheus web UI CVSS 4.0MEDIUM 5.1
Sources
- CVE-2026-40179 · CVE Program
- CVE-2026-40179 · NVD
- FIRST EPSS
- GHSA-vffh-x6r8-xx99 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences