cve.bz

CVE-2026-40179 prometheus prometheus: Cross-site Scripting

5.3 mediumEPSS 0.3%Fix available

Medium (5.3) in prometheus prometheus. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/prometheus/prometheus 0.311.2-0.20260410083055-07c6232d159b, 3.11.2, 3.5.2.

On this page
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.

Severity

CVSS 4.0

5.3 medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

CVSS 3.1

6.1 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 26th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-04-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-40179 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-40179?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-40179?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-40179 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
prometheus:prometheusfrom 3.0.0 before 3.5.2
prometheus:prometheusfrom 3.6.0 before 3.11.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-vffh-x6r8-xx99Gogithub.com/prometheus/prometheus>=3.0.0 <3.5.23.5.2
GHSA-vffh-x6r8-xx99Gogithub.com/prometheus/prometheus>=3.6.0 <3.11.23.11.2
GHSA-vffh-x6r8-xx99Gogithub.com/prometheus/prometheus<0.311.2-0.20260410083055-07c6232d159b0.311.2-0.20260410083055-07c6232d159b
GO-2026-5662Gogithub.com/prometheus/prometheus<0.311.2-0.20260410083055-07c6232d159b0.311.2-0.20260410083055-07c6232d159b

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu16.04:LTS, 18.04:LTS, 20.04:LTS and 5 moreprometheusno fix listedUBUNTU-CVE-2026-40179
SUSEMulti Linux Manager Tools SLE-15golang-github-QubitProducts-exporter_exporter0.4.0-150002.3.6.2SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15golang-github-boynux-squid_exporter1.13.0-150002.3.6.2SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15golang-github-lusitaniae-apache_exporter1.0.10-150002.3.9.2SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15golang-github-prometheus-alertmanager0.28.1-150002.4.11.1SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15golang-github-prometheus-prometheus3.5.3-150002.3.13.1SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15grafana11.6.14+security04-150002.4.21.1SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15mgr-push5.2.4-150002.3.9.1SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15prometheus-blackbox_exporter0.26.0-150002.3.11.1SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15prometheus-postgres_exporter0.10.1-150002.3.3.2SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15python-defusedxml-sle150.7.1-150002.1.3.1SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15rhnlib5.2.5-150002.3.9.1SUSE-SU-2026:2768-1
SUSEMulti Linux Manager Tools SLE-15spacecmd5.2.8-150002.3.12.1SUSE-SU-2026:2768-1
19 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 16.0govulncheck-vulndb0.0.20260723T184607-160000.1.1openSUSE-SU-2026:21483-1
openSUSETumbleweedgolang-github-prometheus-prometheus3.11.2-1.1openSUSE-SU-2026:10607-1
Alpinev3.23, v3.24prometheus3.5.3-r0ALPINE-CVE-2026-40179

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu · SUSE · openSUSE · Alpine.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

  • bsdrip/CVE-2026-40179-PoC Harbor Check: matches CVE 1 star, Python, created
    A minimal, dependency-light proof of concept for CVE-2026-40179 (GHSA-vffh-x6r8-xx99): stored cross-site scripting in the Prometheus web UI…

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON