CVEfocus › CVE database › CVE-2026-40179

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

CVSS 5.3 MediumEPSS 0.4% (higher than 25% of CVEs)Published 2026-04-15Updated 2026-04-16Assigner: GitHub_M

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.

CWE-79

What to do

Fixed builds are available from Alpine, Go: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

3Fixed
7Fix pending
1Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10prometheusFix pendingUBUNTU-CVE-2026-40179
Ubuntu 26.04prometheusFix pendingUBUNTU-CVE-2026-40179
Ubuntu 25.10prometheusWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-40179
Ubuntu 24.04prometheusFix pendingUBUNTU-CVE-2026-40179
Ubuntu 22.04prometheusFix pendingUBUNTU-CVE-2026-40179
Ubuntu 20.04prometheusFix pendingUBUNTU-CVE-2026-40179
Ubuntu 18.04prometheusFix pendingUBUNTU-CVE-2026-40179
Ubuntu 16.04prometheusFix pendingUBUNTU-CVE-2026-40179
Alpine Linux 3.24prometheusFixed3.5.3-r0ALPINE-CVE-2026-40179
Alpine Linux 3.23prometheusFixed3.5.3-r0ALPINE-CVE-2026-40179
Go librarygithub.com/prometheus/prometheusFixed3.11.2GHSA-vffh-x6r8-xx99

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.