Prometheus has Stored XSS via metric names and label values in Prometheus web UI tooltips and metrics explorer (CVE-2026-40179)
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.
CVSS v3.1
Score 6.1medium
Affected software
pkg:bitnami/prometheusRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-40179 describes stored XSS vulnerabilities in Prometheus web UI versions prior to 3.5.2 and between 3.6.0 and 3.11.1. The issue stems from metric names and label values being injected into innerHTML without proper escaping in multiple UI components such as chart tooltips and the Metric Explorer fuzzy search. Attackers able to inject malicious metrics via compromised scrape targets or receivers can execute arbitrary JavaScript in the browsers of users viewing these UI components. This can result in sensitive configuration data exfiltration, deletion of data, or service shutdown depending on the features enabled. The vulnerabilities have been fixed in versions 3.5.2 and 3.11.2. Mitigation strategies include restricting access to remote write and OTLP receivers, trusting scrape targets, disabling administrative or mutating API endpoints in untrusted environments, and avoiding untrusted links that may create poisoned labels.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the browsers of Prometheus users viewing affected UI components. This can lead to exfiltration of configuration data, deletion of data, or shutdown of the Prometheus service depending on enabled features. The vulnerability requires the attacker to inject malicious metrics via compromised scrape targets or receivers.
Mitigation Recommendations
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.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BIT-prometheus-2026-40179
- Osv Schema Version
- 1.6.2
- Aliases
- ["CVE-2026-40179"]
- Ecosystems
- ["Bitnami"]
- Database Specific Severity
- Medium
Threat ID: 6a58b51a68715ace43db454b
Added to database: 07/16/2026, 10:40:26 UTC
Last enriched: 10/06/2026, 21:59:11 UTC
Last updated: 10/14/2026, 18:48:20 UTC
Views: 107
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.