Catégories
CVE-2026-40179

XSS (Cross-Site Scripting) dans github.com/prometheus/prometheus (CVE-2026-40179)

Résumé

XSS dans github.com/prometheus/prometheus (CVE-2026-40179). Risque d'opérations non autorisées ou de divulgation. Exploitable via innerHTML. Atténuation : mise à jour vers 2.7.2 ou plus.

Description d'origine

La description telle que publiée par la source (souvent en anglais).

Impact

Stored cross-site scripting (XSS) via crafted metric names in the Prometheus web UI:

  • Old React UI + New Mantine UI: When a user hovers over a chart tooltip on the Graph page, metric names containing HTML/JavaScript are injected into innerHTML without escaping, causing arbitrary script execution in the user's browser.
  • Old React UI only: When a user opens the Metric Explorer (globe icon next to the PromQL expression input field), and a metric name containing HTML/JavaScript is rendered in the fuzzy search results, it is injected into innerHTML without escaping, causing arbitrary script execution in the user's browser.
  • Old React UI only: When a user views a heatmap chart and hovers over a cell, the le label values of the underlying histogram buckets are interpolated into innerHTML without escaping. While le is conventionally a numeric bucket boundary, Prometheus does not enforce this — arbitrary UTF-8 strings are accepted as label values, allowing script injection via a crafted scrape target or remote write.

With Prometheus v3.x defaulting to UTF-8 metric and label name validation, characters like <, >, and " are now valid in metric names and labels, making this exploitable.

An attacker who can inject metrics (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 Graph UI. From the XSS context, an attacker could for example…

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Résumé généré automatiquement

Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.

Une vulnérabilité référencée CVE-2026-40179 a été découverte dans github.com/prometheus/prometheus.
Des attaquants peuvent cibler un point d'entrée spécifique comme innerHTML à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour github.com/prometheus/prometheus vers 2.7.2 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/prometheus/prometheus CVE-2026-40179 » sur le site de l'éditeur.

CVE-2026-40179 (github.com/prometheus/prometheus) — CWE-79
Surface d'attaque : innerHTML / labels.__name__ / dangerouslySetInnerHTML
Correctif : 2.7.2 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.

❓ Quel est le problème

Une XSS (CWE-79) affecte github.com/prometheus/prometheus. Les attaquants atteignent le code vulnérable via innerHTML.

📍 Périmètre concerné

Consultez l'avis de l'éditeur pour les versions affectées de github.com/prometheus/prometheus. Surface d'attaque : innerHTML / labels.__name__ / dangerouslySetInnerHTML.

🔥 Gravité

Gravité : ?. Risque d'opérations non autorisées ou de divulgation.

🔧 Comment corriger

Mettre à jour vers 2.7.2.

🛡️ Contournement

En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.

🔍 Détection

Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.

Actions de réponse

Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre

  1. 1
    Identify exposure identify
    grep -r 'github.com/prometheus/prometheus' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で github.com/prometheus/prometheus を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade github.com/prometheus/prometheus to 2.7.2

    ステージング環境で 2.7.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Paquets affectés

Go github.com/prometheus/prometheus
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.311.2-0.20260410083055-07c6232d159b"}]}]
Bitnami prometheus
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.305.2"},{"introduced":"0.306.0"},{"fixed":"0.311.2"},{"introduced":"1.0.0"},{"fixed":"3.5.2"},{"introduced":"3.6.0"},{"fixed":"3.11.2"}]}]

État des correctifs par distribution

Paquets corrigés publiés par chaque distribution pour cette CVE

Références

Nous utilisons des cookies pour l'analyse d'audience et la mesure publicitaire. Ce réglage s'applique à tous les sites de Game co., Ltd. En savoir plus