Skip to main content
Public proof of conceptFix available

CVE-2026-40179

A public proof of concept exists; no exploitation attested.

  • Published2026-04-15
  • Fixed in3.11.2 · 3.5.2 · 0.311.2 · 0.311.2-0.20260410083055-07c6232d159b · 0.305.2
  • WeaknessCWE-79

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2026-04-1523:16CVE publishedNVD

Versions per branch

NVD · OSV
Prometheus
BranchAffectedFixed in
3.x≥ 3.6.0, < 3.11.23.11.2
3.x≥ 3.0.0, < 3.5.23.5.2
3.5≥ 1.0.0, < 3.5.23.5.2
0.x≥ 0.306.0, < 0.311.20.311.2
0.311< 0.311.2-0.20260410083055-07c6232d159b0.311.2-0.20260410083055-07c6232d159b
0.305< 0.305.20.305.2

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As GitHub_M, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • prometheus
    Affected
    • = >= 3.0.0, < 3.5.2no fix stated
    • = >= 3.6.0, < 3.11.2no fix stated
    • = < 0.311.2-0.20260410083055-07c6232d159bno fix stated

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-04-15

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • agentbeatChainguardall versions · fixed in 9.2.7-r4
  • agentbeat-fipsChainguardall versions · fixed in 9.2.7-r5
  • amazon-cloudwatch-agentMinimOSall versions · no fixed version listedand 209 other packages
  • amazon-cloudwatch-agentCleanStartall versions · fixed in 1.300071.0-r1
  • amazon-cloudwatch-agent-operatorMinimOSall versions · fixed in 3.5.0-r0and 1 other package
  • aws-otel-collectorWolfiall versions · fixed in 0.49.0-r0
  • aws-otel-collectorMinimOSall versions · fixed in 0.49.0-r0and 1 other package
  • aws-otel-collectorChainguardall versions · fixed in 0.49.0-r0and 1 other package

246 more package ranges on OSV.dev

Full record on NVD

Fix

  1. Update Prometheus to 3.11.2 · 3.5.2 · 0.311.2 · 0.311.2-0.20260410083055-07c6232d159b · 0.305.2

Advisories and patches

Detection

read 2026-11-01 01:02 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
CVSS 4.0 vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Published
2026-04-15
Last Modified
2026-06-17
NVD status
Analyzed
MSRC Title
Prometheus: Stored XSS via metric names and label values in web UI tooltips and metrics explorer
GitHub Advisory
GHSA-vffh-x6r8-xx99

Frequently asked questions

What is CVE-2026-40179?

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.

Is CVE-2026-40179 actively exploited?

Active exploitation of CVE-2026-40179 has not been confirmed. Its EPSS score was 0.3% on 2026-11-18, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-40179?

CVE-2026-40179 has a CVSS v3 base score of 6.1 (MEDIUM severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.

Running prometheus? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record