CVE-2026-40179

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

MEDIUM
6.1
CVSS Score
Published: April 15, 2026 at 10:26 PM UTC
Updated: June 17, 2026 at 10:44 AM UTC
1 product affected across 1 vendorPrometheus

Using prometheus by prometheus?

Get instant alerts when new vulnerabilities affect prometheus - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.1
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 0.311.2-0.20260410083055-07c6232d159bv < 3.11.2v < 3.5.23.0.0 ≤ v < 3.5.23.6.0 ≤ v < 3.11.2
Affected range stops below 0.311.2-0.20260410083055-07c6232d159b, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.11.2, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.5.2, so it looks safe — our inference, not a vendor statement

References (3)

x_refsource_CONFIRMMitigationVendor Advisory
Source: cverecord
https://github.com/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99
x_refsource_MISCIssue TrackingPatch
Source: cverecord
https://github.com/prometheus/prometheus/pull/18506

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-79

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card