Back to the CVE list
CVE-2026-40179

Prometheus: Stored XSS via metric names and label values in web UI tooltips and metrics explorer

CVSS score

6.1

EPSS probability

%0.3

Risk score

0.0

Published

6 mo ago

Official patch verified

Etkilenen ürün ve sürüm için yayımlanan güvenlik güncellemesini uygulayın.

Impact on My Inventory

Only the personal products you have added to your account are assessed; an organisation's inventory does not appear here.

Checking session…

Vulnerability description

DayBreach CVE AI Research

CVE-2026-40179 has vendor, distribution, patch and security-source records on file. We can compare them and prepare an explanation linked to the evidence.

### Impact Stored cross-site scripting (XSS) via crafted metric names in the Prometheus web UI: * **Old React UI + New Mantine UI:** When a user hovers over a chart tooltip on the Graph page, metric names containing HTML/JavaScript are injected into `innerHTML` without escaping, causing arbitrary script execution in the user's browser. * **Old React UI only:** When a user opens the Metric Explorer (globe icon next to the PromQL expression input field), and a metric name containing HTML/JavaScript is rendered in the fuzzy search results, it is injected into `innerHTML` without escaping, causing arbitrary script execution in the user's browser. * **Old React UI only:** When a user views a heatmap chart and hovers over a cell, the `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: - Read `/api/v1/status/config` to extract sensitive configuration (although credentials / secrets are redacted by the server) - Call `/-/quit` to shut down Prometheus (only if `--web.enable-lifecycle` is set) - Call `/api/v1/admin/tsdb/delete_series` to delete data (only if `--web.enable-admin-api` is set) - Exfiltrate metric data to an external server 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 sanitization - `web/ui/react-app/src/vendor/flot/jquery.flot.heatmap.js` — heatmap tooltip with unescaped label values ### Patches A 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. ### Workarounds - If using the remote write receiver (`--web.enable-remote-write-receiver`), ensure it is not exposed to untrusted sources. - If using the OTLP receiver (`--web.enable-otlp-receiver`), ensure it is not exposed to untrusted sources. - Ensure scrape targets are trusted and not under attacker control. - Do not enable admin / mutating API endpoints (e.g. `--web.enable-admin-api` or `web.enable-lifecycle`) in cases where you cannot prevent untrusted data from being ingested. - Users should avoid clicking untrusted links, especially those containing functions such as label_replace, as they may generate poisoned label names and values. ### References - CVE-2019-10215 — prior stored DOM XSS vulnerability in Prometheus query history, fixed in v2.7.2 ### Acknowledgements Thanks to @gladiator9797 (Duc Anh Nguyen from TinyxLab) for reporting this.

IMPACT: Affected Products and Software

Affected Products

The following products are affected by CVE-2026-40179 vulnerability. Where our threat engine knows the exact affected versions, they are listed below.

IDVENDORPRODUCTACTION
1gogithub.com/prometheus/prometheus View
2gogithub.com/prometheus/prometheus View
3gogithub.com/prometheus/prometheus View
4gogithub.com/prometheus/prometheus View
Total affected vendors: 1|Products: 4

RED HAT CSAF/VEX: Product Impact Check

Red Hat has not yet published a CSAF/VEX impact record for this CVE. This does not mean “not affected”.

SCORING: CVSS from Multiple Sources

CVSS Scores

The Common Vulnerability Scoring System is a standardised framework for assessing the severity of vulnerabilities in software and systems. We collect and display CVSS scores from several sources for each CVE.

SCOREVERSIONSEVERITYVECTORSOURCE
6.1CVSS 3.x—Vector not publishedGitHub Advisory
5.3CVSS 4.0—Vector not publishedGitHub Advisory

Patch and Remediation Guide

Solution & Remediation Advisory

Patch verified

5 doğrulanmış yama veya düzeltilmiş sürüm kanıtı bulundu.

osvgithub.com/prometheus/prometheus0.311.2-0.20260410083055-07c6232d159b

OSV düzeltilmiş sürüm: 0.311.2-0.20260410083055-07c6232d159b

gitlabgo/github.com/prometheus/prometheus0.311.2-0.20260410083055-07c6232d159b

GitLab Advisory düzeltilmiş sürüm: 0.311.2-0.20260410083055-07c6232d159b

gitlabgo/github.com/prometheus/prometheus3.5.2

GitLab Advisory düzeltilmiş sürüm: 3.5.2

gitlabgo/github.com/prometheus/prometheus3.11.2

GitLab Advisory düzeltilmiş sürüm: 3.11.2

gitlab

Upgrade to versions 0.311.2-0.20260410083055-07c6232d159b, 3.5.2, 3.11.2 or above.

reference

Yama veya çözüm referansı

Open source
canonical

Upgrade to versions 0.311.2-0.20260410083055-07c6232d159b, 3.5.2, 3.11.2 or above.

Confirm the affected product and version against the source evidence above.
Restrict access to internet-facing services and apply network segmentation.
Apply the official update named in the evidence only to the matching product and version.
Monitor server logs and network endpoints for signs of anomalous execution.

Public exploit and active exploitation status

Verified exploit intelligence

No verified public PoC, exploit repository or Metasploit module has been found for this CVE yet.

Weakness Classification and Attack Patterns (CWE & CAPEC)

CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorises the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-40179 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-40179 weaknesses.

Attack Vector and Accessibility

ExposureAğ üzerinden
PermissionsGerekmiyor
UserGerekiyor

Official Sources and Advisories

CVSS Vector Radar Chart

6.1 / 10
Attack VectorNetworkComplexityLowPrivilegesNoneUser Interact.RequiredConfidentialityLowIntegrityLowAvailabilityNone

Vulnerability Scoring Details

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone required
User Interaction—
Confidentiality (Gizlilik)Low
Integrity (Bütünlük)Low
Availability (Erişilebilirlik)None

Yama doğrulandı

5 doğrulanmış yama veya düzeltilmiş sürüm kanıtı bulundu.

Follow the vendor

G
go logo
go

Weakness Type (CWE & CAPEC)

Similar Vulnerabilities

Get this vulnerability through the API

Affected products, version ranges, exploitation status and patch information in a single request, with a free key.

curl -H "x-api-key: $DAYBREACH_API_KEY" \
  "https://api.daybreach.dev/api/v1/intel/cves/CVE-2026-40179"