CVE-2026-40179 Details
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.
A stored cross-site scripting vulnerability has been identified in Prometheus versions 3.0 prior to 3.5.1 and 3.6.0 prior to 3.11.1. This vulnerability exists in multiple components of the Prometheus web UI, where metric names and label values are injected into the innerHTML without proper escaping. In both the Mantine UI and the old React UI, chart tooltips on the Graph page render metric names containing HTML or JavaScript without sanitization. Additionally, the old React UI's Metric Explorer fuzzy search results and heatmap cell tooltips also lack proper label value sanitization. With Prometheus v3.x allowing unescaped characters in metric and label names, an attacker could exploit this vulnerability to execute arbitrary JavaScript in the browser of any user viewing the affected metric, potentially leading to configuration exfiltration, data deletion, or a shutdown of the Prometheus server, depending on the enabled flags.
Users can update to Prometheus versions 3.5.2 or 3.11.2, where this vulnerability has been patched. If an immediate update is not possible, it is recommended to ensure that the remote write and OTLP receivers are not exposed to untrusted sources, verify that all scrape targets are trusted, avoid enabling admin or mutating API endpoints in environments where untrusted data may be ingested, and refrain from clicking untrusted links that could generate poisoned label names and values.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 16, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/prometheus/prometheus/commit/07c6232d159bfb474a077788be184d87adcfac3c | [email protected] | Patch |
| https://github.com/prometheus/prometheus/pull/18506 | [email protected] | Issue TrackingPatch |
| https://github.com/prometheus/prometheus/security/advisories/GHSA-vffh-x6r8-xx99 | [email protected] | MitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| prometheus prometheus | >= 3.0.0, < 3.5.2 >= 3.6.0, < 3.11.2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 22, 2026 | Initial Analysis | [email protected] |
| Apr 15, 2026 | New CVE Received | [email protected] |