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
innerHTMLwithout 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
innerHTMLwithout 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
lelabel values of the underlying histogram buckets are interpolated intoinnerHTMLwithout escaping. Whileleis 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.
Une XSS (CWE-79) affecte github.com/prometheus/prometheus. Les attaquants atteignent le code vulnérable via innerHTML.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/prometheus/prometheus. Surface d'attaque : innerHTML / labels.__name__ / dangerouslySetInnerHTML.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 2.7.2.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
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
-
1Identify 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 し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/prometheus/prometheus to 2.7.2ステージング環境で 2.7.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
État des correctifs par distribution
Paquets corrigés publiés par chaque distribution pour cette CVE
- Ubuntu UBUNTU-CVE-2026-40179 prometheus
Références
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com