| タイトル | dgraphにおけるデータクエリロジックの特殊要素の不適切な中立化に関する脆弱性 |
|---|---|
| 概要 | Dgraphはオープンソースの分散型GraphQLデータベースです。バージョン25.3.3より前のDgraphには、認証されていない攻撃者がデータベース内の全データに対して完全な読み取り権限を取得できる脆弱性があります。この脆弱性は、ACLが有効でないDgraphのデフォルト構成に影響します。攻撃はポート8080に対する2回のHTTP POSTリクエストを必要とします。1回目は/alterに対して@unique、@index(exact)、@lang付きのスキーマ述語を設定します(これはデフォルト構成で認証が不要です)。2回目は/pmutate?commitNow=trueに対し、述語名に@とDQLインジェクションペイロードを言語タグ位置に含む巧妙に作成されたJSONミューテーションを送信します。このインジェクションはedgraph/server.goのaddQueryIfUnique関数を悪用しており、fmt.Sprintfを使用して未サニタイズのpredicateNameを含むDQLクエリを構築します。このpredicateNameには生のpred.Lang値が含まれています。LangフィールドはJSONミューテーションキーからx.PredicateLang()により@で分割され抽出されますが、コードベースのどの関数でも検証されません。攻撃者は閉じ括弧を注入してeq()関数からエスケープし、任意の名前付きクエリブロックを追加し、さらに#コメントで後続のテンプレート構文を無効化します。注入されたクエリはサーバー側で実行され、その結果はHTTPレスポンスで返されます。この脆弱性はバージョン25.3.3で修正されています。 |
| 想定される影響 | 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアは停止しません。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 |
| 対策 | 正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。 |
| 公表日 | 2026年4月24日0:00 |
| 登録日 | 2026年4月30日11:01 |
| 最終更新日 | 2026年4月30日11:01 |
| CVSS3.0 : 緊急 | |
| スコア | 9.1 |
|---|---|
| ベクター | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| dgraph |
| dgraph 25.3.3 未満 |
| No | 変更内容 | 変更日 |
|---|---|---|
| 1 | [2026年04月30日] 掲載 |
2026年4月30日11:01 |
| 概要 | Dgraph is an open source distributed GraphQL database. Prior to 25.3.3, a vulnerability has been found in Dgraph that gives an unauthenticated attacker full read access to every piece of data in the database. This affects Dgraph's default configuration where ACL is not enabled. The attack requires two HTTP POSTs to port 8080. The first sets up a schema predicate with @unique @index(exact) @lang via /alter (also unauthenticated in default config). The second sends a crafted JSON mutation to /mutate?commitNow=true where a JSON key contains the predicate name followed by @ and a DQL injection payload in the language tag position. The injection exploits the addQueryIfUnique function in edgraph/server.go, which constructs DQL queries using fmt.Sprintf with unsanitized predicateName that includes the raw pred.Lang value. The Lang field is extracted from JSON mutation keys by x.PredicateLang(), which splits on @, and is never validated by any function in the codebase. The attacker injects a closing parenthesis to escape the eq() function, adds an arbitrary named query block, and uses a # comment to neutralize trailing template syntax. The injected query executes server-side and its results are returned in the HTTP response. This vulnerability is fixed in 25.3.3. |
|---|---|
| 公表日 | 2026年4月25日4:17 |
| 登録日 | 2026年4月26日4:07 |
| 最終更新日 | 2026年4月29日3:31 |
| 構成1 | 以上 | 以下 | より上 | 未満 | |
| cpe:2.3:a:dgraph:dgraph:*:*:*:*:*:go:*:* | 25.3.3 | ||||