Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2026-40179

MEDIUM 5.3EPSS 25%

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

Also known as BIT-prometheus-2026-40179, GHSA-vffh-x6r8-xx99, GO-2026-5662

Mitigation

  • Upgrade github.com/prometheus/prometheus to one of 3.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159b (or later in the same release line).

Who should check

  • Projects that depend on Go package github.com/prometheus/prometheus (>= 3.0.0, < 3.5.2)
  • Anyone running prometheus >= 3.0.0, < 3.5.2; >= 3.6.0, < 3.11.2; < 0.311.2-0.20260410083055-07c6232d159b

Vulnerability facts

Affected
github.com/prometheus/prometheus >= 3.0.0, < 3.5.2
Fixed in
3.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159b
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
5.3 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Attack requirements: None
  • Privileges required: None
  • User interaction: Passive
  • Confidentiality impact: None
  • Integrity impact: None
  • Availability impact: None
  • Confidentiality impact on other systems: Low
  • Integrity impact on other systems: Low
  • Availability impact on other systems: None
EPSS
0.39% chance of exploitation in 30 days (percentile 25, 2026-11-26)
CWE
CWE-79
Published
Modified

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 and fixed versions

Package / productAffectedFixedSource
Go github.com/prometheus/prometheus>= 3.0.0, < 3.5.23.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159bosv
prometheus>= 3.0.0, < 3.5.2; >= 3.6.0, < 3.11.2; < 0.311.2-0.20260410083055-07c6232d159b—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2026-40179. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-40179.md
Affected: github.com/prometheus/prometheus >= 3.0.0, < 3.5.2
Fixed in: 3.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159b

Steps:
1. Search this machine and project for github.com/prometheus/prometheus (Go), prometheus: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2026-40179 being exploited?

There is no confirmed exploitation: CVE-2026-40179 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.39% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2026-40179?

Medium: CVSS 5.3 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

Which versions are affected by CVE-2026-40179?

github.com/prometheus/prometheus >= 3.0.0, < 3.5.2.

Is there a fix for CVE-2026-40179?

Yes. Fixed in 3.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159b. Upgrade github.com/prometheus/prometheus to one of 3.5.2, 3.11.2, 0.311.2-0.20260410083055-07c6232d159b (or later in the same release line).

How do I check if I'm affected by CVE-2026-40179?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors