Prometheusにおけるクロスサイトスクリプティングの脆弱性
タイトル Prometheusにおけるクロスサイトスクリプティングの脆弱性
概要

Prometheusはオープンソースの監視システムおよび時系列データベースです。バージョン3.0から3.5.1および3.6.0から3.11.1には、PrometheusのWeb UIの複数のコンポーネントにクロスサイトスクリプティングの脆弱性が存在し、メトリクス名やラベル値がエスケープされることなくinnerHTMLに挿入されていました。Mantine UIおよび旧React UIの両方において、GraphページのチャートツールチップはHTMLやJavaScriptを含むメトリクス名をサニタイズせずにレンダリングします。旧React UIでは、Metric Explorerのあいまい検索結果がエスケープされずにdangerouslySetInnerHTMLを使用し、ヒートマップのセルツールチップがラベル値をサニタイズせずに補間します。Prometheus v3.xでは、UTF-8のメトリクス名およびラベル名のバリデーションがデフォルトで有効になっており、""や""、"\""などの文字がメトリクス名およびラベルで有効になっています。攻撃者がスクレイプターゲット、リモートライト、OTLPレシーバーエンドポイントのいずれかを不正に操作してメトリクスを注入できる場合、Graph UIでそのメトリクスを確認する任意のPrometheusユーザーのブラウザ上で任意のJavaScriptが実行され、不正な設定の窃取やデータ削除、またはフラグの設定次第でPrometheusの停止が可能になる恐れがあります。この問題はバージョン3.5.2および3.11.2で修正されています。開発者がすぐに更新できない場合は、次の回避策を推奨します。リモートライトレシーバー(--web.enable-remote-write-receiver)およびOTLPレシーバー(--web.enable-otlp-receiver)を信頼されていないソースに対して公開しないこと、すべてのスクレイプターゲットが信頼でき、攻撃者の制御下にないことを確認すること、信頼できないデータが取り込まれる環境で管理者または変更可能なAPIエンドポイント(例:--web.enable-admin-apiや--web.enable-lifecycle)を有効にしないこと、およびlabel_replaceなどの関数を含む不審なリンクをクリックしないこと(これらは汚染されたラベル名や値を生成する可能性があります)です。

想定される影響 当該ソフトウェアが扱う情報の一部が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う情報の一部が書き換えられる可能性があります。 さらに、当該ソフトウェアは停止しません。 そして、この脆弱性を悪用した攻撃により、他のソフトウェアにも影響が及ぶ可能性があります。 
対策

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

公表日 2026年4月15日0:00
登録日 2026年4月24日11:41
最終更新日 2026年4月24日11:41
CVSS3.0 : 警告
スコア 6.1
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
影響を受けるシステム
Prometheus
Prometheus 3.0.0 以上 3.5.2 未満
Prometheus 3.6.0 以上 3.11.2 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年04月24日]
  掲載
2026年4月24日11:41

NVD脆弱性情報
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.

公表日 2026年4月16日8:16
登録日 2026年4月17日4:12
最終更新日 2026年4月23日5:04
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:prometheus:prometheus:*:*:*:*:*:*:*:* 3.0.0 3.5.2
cpe:2.3:a:prometheus:prometheus:*:*:*:*:*:*:*:* 3.6.0 3.11.2
関連情報、対策とツール
共通脆弱性一覧