CVE-2026-40179
MediumCVSS 6.1Summary
Prometheus versions 3.0 through 3.5.1 and 3.6.0 through 3.11.1 contain stored cross-site scripting vulnerabilities in the web UI where metric names and label values are injected into innerHTML without escaping. Because Prometheus v3.x defaults to UTF-8 validation allowing characters like <, >, and " in metric and label names, an attacker who can inject metrics via a compromised scrape target, remote write, or OTLP receiver can execute arbitrary JavaScript in the browser of any user viewing the metric in the Graph UI. The issue is fixed in versions 3.5.2 and 3.11.2.
Risk Assessment
An attacker can execute arbitrary JavaScript in a Prometheus user's browser, potentially enabling configuration exfiltration, data deletion, or Prometheus shutdown depending on enabled flags. The risk affects organizations that ingest metric data from untrusted sources.
Recommendation
Update Prometheus to version 3.5.2 or 3.11.2. If immediate update is not possible, do not expose the remote write receiver (--web.enable-remote-write-receiver) and OTLP receiver (--web.enable-otlp-receiver) to untrusted sources, verify that all scrape targets are trusted, avoid enabling admin or mutating API endpoints, and refrain from clicking untrusted links containing functions such as label_replace.
Other vulnerabilities in Prometheus
See all- CVE-2026-119566Medium
Prometheus through 3.15.1 contains a credential leak vulnerability that allows attackers to capture Azure AD or Google IAM bearer tokens by redirecting remote_write requests to another host. Attackers controlling the remote-write endpoint or a redirecting server can return a 3xx to their host and replay the token, for example to write metrics to the victim's backend.
- CVE-2026-44903Medium
Prometheus from version 2.49.0 to before 3.5.3 and 3.11.3 contains an XSS vulnerability in the legacy web UI (enabled via --enable-feature=old-ui). In the histogram heatmap chart view, 'le' label values are not properly escaped, allowing an attacker to inject JavaScript via crafted metrics.
- CVE-2026-42154High
Prometheus before versions 3.5.3 and 3.11.3 does not validate the declared decoded length in a snappy-compressed request to the /api/v1/read endpoint before allocating memory. An unauthenticated attacker can send a small payload causing a huge heap allocation, potentially exhausting memory and crashing the Prometheus process under concurrent load.
- CVE-2026-42151High
Prometheus prior to versions 3.5.3 and 3.11.3 stores the client_secret field in Azure AD OAuth configuration as a plain string instead of a Secret. This exposes the Azure OAuth client secret in plaintext to any user or process with access to the /-/config endpoint.
Original NVD description (English source)
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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

