| Title | CERNのRucioにおけるSQL インジェクションの脆弱性 |
|---|---|
| Summary | `FilterEngine.create_sqla_query()` におけるSQLインジェクション脆弱性により、認証済みの任意のRucioユーザーがDID検索エンドポイント(`GET /dids/scope/dids/search`)を介してバックエンドデータベースに対して任意のSQLを実行できます。Oracle環境では攻撃者が制御するフィルターキーと値がPythonの `.format()` によって `sqlalchemy.text()` に直接挿入され、パラメータ化を完全にバイパスします。これにより認証トークン、パスワードハッシュ、すべての管理データ識別子の抽出を含むデータベース全体の完全な侵害が可能となります。本脆弱性はバージョン1.27.0以降から35.8.5、38.5.5、39.4.2、40.1.1より前のバージョンに影響します。脆弱性は `lib/rucio/core/did_meta_plugins/filter_engine.py` の `create_sqla_query()` メソッドに存在し、データベース方言がOracleの場合、JSONメタデータカラムのフィルター式がPython文字列フォーマットを用いた `text()` によって構築されます。`key` と `value` はHTTPクエリパラメータに由来する攻撃者制御の文字列であり、`text()` は内容のエスケープやパラメータ化を行わない生のSQLフラグメントを生成します。認証済みの任意のRucioユーザーはDID検索APIを介してこれを悪用でき、バックエンドデータベースに対して任意のSQLを実行可能で、すべての管理データ識別子および識別子、トークン、アカウント、rse_settings、ルールなどの機密テーブルの情報漏洩やデータベース内容の変更を引き起こす可能性があります。本問題はデフォルトのjson_metaプラグインを使用するOracle環境に影響し、PostgreSQLやMySQL環境には影響しません。本脆弱性はバージョン35.8.5、38.5.5、39.4.2、40.1.1で修正されています。 |
| Possible impacts | 当該ソフトウェアが扱う全ての情報が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う全ての情報が書き換えられる可能性があります。 さらに、当該ソフトウェアが完全に停止する可能性があります。 そして、この脆弱性を悪用した攻撃の影響は、他のソフトウェアには及びません。 |
| Solution | 正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。 |
| Publication Date | May 6, 2026, midnight |
| Registration Date | May 12, 2026, 10:20 a.m. |
| Last Update | May 12, 2026, 10:20 a.m. |
| CVSS3.0 : 重要 | |
| Score | 8.8 |
|---|---|
| Vector | CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| CERN |
| Rucio 1.27.0 以上 35.8.5 未満 |
| Rucio 36.0.0 以上 38.5.5 未満 |
| Rucio 39.0.0 以上 39.4.2 未満 |
| Rucio 40.0.0 以上 40.1.1 未満 |
| No | Changed Details | Date of change |
|---|---|---|
| 1 | [2026年05月12日] 掲載 |
May 12, 2026, 10:20 a.m. |
| Summary | A SQL injection vulnerability in `FilterEngine.create_sqla_query()` allows any authenticated Rucio user to execute arbitrary SQL against the backend database through the DID search endpoint (`GET /dids/<scope>/dids/search`). On Oracle deployments attacker-controlled filter keys and values are interpolated directly into `sqlalchemy.text()` via Python `.format()`, completely bypassing parameterization. This enables full database compromise including extraction of authentication tokens, password hashes, and all managed data identifiers. This affects versions 1.27.0 and later before 35.8.5, 38.5.5, 39.4.2, and 40.1.1. The vulnerability exists in `lib/rucio/core/did_meta_plugins/filter_engine.py` within the `create_sqla_query()` method. When the database dialect is Oracle, filter expressions for JSON metadata columns are constructed using `text()` with Python string formatting. Both `key` and `value` are attacker-controlled strings derived from HTTP query parameters. The `text()` function creates a raw SQL fragment — it does **not** escape or parameterize its contents. Any authenticated Rucio user can exploit this through the DID search API to execute arbitrary SQL against the backend database. This can expose all managed data identifiers and sensitive tables such as identities, tokens, accounts, rse_settings, and rules, and may allow modification of database contents. The issue affects Oracle deployments using the default json_meta plugin and does not affect PostgreSQL or MySQL deployments using that plugin. This vulnerability has been fixed in versions 35.8.5, 38.5.5, 39.4.2, and 40.1.1. |
|---|---|
| Publication Date | May 7, 2026, 2:16 a.m. |
| Registration Date | May 7, 2026, 4:09 a.m. |
| Last Update | May 12, 2026, 12:07 a.m. |
| Configuration1 | or higher | or less | more than | less than | |
| cpe:2.3:a:cern:rucio:*:*:*:*:*:*:*:* | 1.27.0 | 35.8.5 | |||
| cpe:2.3:a:cern:rucio:*:*:*:*:*:*:*:* | 36.0.0 | 38.5.5 | |||
| cpe:2.3:a:cern:rucio:*:*:*:*:*:*:*:* | 39.0.0 | 39.4.2 | |||
| cpe:2.3:a:cern:rucio:*:*:*:*:*:*:*:* | 40.0.0 | 40.1.1 | |||