Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/prometheus/prometheus
  4. ›
  5. GHSA-fw8g-cg8f-9j28

GHSA-fw8g-cg8f-9j28: Prometheus vulnerable to stored XSS via crafted histogram bucket label values in the old web UI heatmap display

May 5, 2026 (updated May 8, 2026)

In the Prometheus server’s legacy web UI (enabled via the command-line flag --enable-feature=old-ui), the histogram heatmap chart view does not escape le label values when inserting them into the HTML for use as axis tick mark labels.

An attacker who can inject crafted metrics (e.g. via a compromised scrape target, remote write, or OTLP receiver endpoint) can execute JavaScript in the browser of any Prometheus user who views the metric in the heatmap chart UI. From the XSS context, an attacker could for example:

  • Read /api/v1/status/config to extract sensitive configuration (although credentials / secrets are redacted by the server)
  • Call /-/quit to shut down Prometheus (only if --web.enable-lifecycle is set)
  • Call /api/v1/admin/tsdb/delete_series to delete data (only if --web.enable-admin-api is set)
  • Exfiltrate metric data to an external server

Note that this only affects users who have explicitly enabled the legacy Prometheus web UI using the --enable-feature=old-ui command-line flag.

References

  • github.com/advisories/GHSA-fw8g-cg8f-9j28
  • github.com/prometheus/prometheus
  • github.com/prometheus/prometheus/commit/38f23b9075ced1de2b82d2dad8b2bebb1ecd5b7d
  • github.com/prometheus/prometheus/security/advisories/GHSA-fw8g-cg8f-9j28

Code Behaviors & Features

Detect and mitigate GHSA-fw8g-cg8f-9j28 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.311.3

Fixed versions

  • 0.311.3

Solution

Upgrade to version 0.311.3 or above.

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

go/github.com/prometheus/prometheus/GHSA-fw8g-cg8f-9j28.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 15 May 2026 12:19:22 +0000.