CVE-2026-40179Medium· 6.1▾ TwilightPoC availablePrometheus has Stored XSS via metric names and label values in Prometheus web UI tooltips and metrics explorer
▾ Twilight zone — High severity, or a signal on a lesser flaw
impact 33.6 · likelihood 0.1 · exploitation 12
A public proof-of-concept already exists for this vulnerability — see Exploit availability below.
Public exploit / PoC code seen in 1 source. Availability, not in-the-wild use.
Exploit-prediction probability, daily snapshots since Aug 1.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
0.3%
1 GitHub repo
0.3% → 0.3%
Last analysed / modified upstream
— → 6.1
none → medium
Stored cross-site scripting (XSS) via crafted metric names in the Prometheus web UI:
innerHTML without escaping, causing arbitrary script execution in the user's browser.innerHTML without escaping, causing arbitrary script execution in the user's browser.le label values of the underlying histogram buckets are interpolated into innerHTML without escaping. While le is conventionally a numeric bucket boundary, Prometheus does not enforce this — arbitrary UTF-8 strings are accepted as label values, allowing script injection via a crafted scrape target or remote write.With Prometheus v3.x defaulting to UTF-8 metric and label name validation, characters like <, >, and " are now valid in metric names and labels, making this exploitable.
An attacker who can inject metrics (via a compromised scrape target, remote write, or OTLP receiver endpoint) can execute JavaScript in the browser of any Prometheus user who views the metric in the Graph UI. From the XSS context, an attacker could for example:
/api/v1/status/config to extract sensitive configuration (although credentials / secrets are redacted by the server)/-/quit to shut down Prometheus (only if --web.enable-lifecycle is set)/api/v1/admin/tsdb/delete_series to delete data (only if --web.enable-admin-api is set)Both the new Mantine UI and the old React UI are affected. The vulnerable code paths are:
web/ui/mantine-ui/src/pages/query/uPlotChartHelpers.ts — tooltip innerHTML with unescaped labels.__name__web/ui/react-app/src/pages/graph/GraphHelpers.ts — tooltip content with unescaped labels.__name__web/ui/react-app/src/pages/graph/MetricsExplorer.tsx — fuzzy search results rendered via dangerouslySetInnerHTML without sanitizationweb/ui/react-app/src/vendor/flot/jquery.flot.heatmap.js — heatmap tooltip with unescaped label valuesA patch has been published in Prometheus 3.5.2 LTS and Prometheus 3.11.2. The fix applies escapeHTML() to all user-controlled values (metric names and label values) before inserting them into innerHTML. This advisory will be updated with the patched version once released.
--web.enable-remote-write-receiver), ensure it is not exposed to untrusted sources.--web.enable-otlp-receiver), ensure it is not exposed to untrusted sources.--web.enable-admin-api or web.enable-lifecycle) in cases where you cannot prevent untrusted data from being ingested.Thanks to @gladiator9797 (Duc Anh Nguyen from TinyxLab) for reporting this.
github.com/prometheus/prometheus >= 3.0.0, < 3.5.2github.com/prometheus/prometheus >= 3.6.0, < 3.11.2github.com/prometheus/prometheus < 0.311.2-0.20260410083055-07c6232d159bUpgrade to a patched release:
github.com/prometheus/prometheus 3.5.2github.com/prometheus/prometheus 3.11.2github.com/prometheus/prometheus 0.311.2-0.20260410083055-07c6232d159bField changes observed since this record was first indexed.
Connected by shared product, vendor, weakness, or advisory.
CVE-2026-42151High· 7.5Prometheus is an open-source monitoring system and time series database
CVE-2021-41182Medium· 6.5jQuery-UI is the official jQuery user interface library
CVE-2020-3580Medium· 6.1Multiple vulnerabilities in the web services interface of Cisco Adaptive Security Appliance (ASA) Software and Cisco Firepower Threat Defense (FTD) Software could allow an unauthenticated, remote attacker to conduct cross-site scripting …
CVE-2021-41164High· 8.2CKEditor4 is an open source WYSIWYG HTML editor
CVE-2021-41183Medium· 6.5jQuery-UI is the official jQuery user interface library
CVE-2019-1973Medium· 4.8A vulnerability in the web portal framework of Cisco Enterprise NFV Infrastructure Software (NFVIS) could allow an authenticated, remote attacker to conduct a cross-site scripting (XSS) attack against a user of the web-based interface