Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2026-52614 — Ruoyi v4.8.3のバックエンドにSQLインジェクションの脆弱性があります。 | Kitploit
ツール/GitHubGitHub/chinesespeople/cve-2026-52614
パスワードクラッキング脆弱性分析エクスプロイトウェブアプリケーション悪用ペネトレーションテスト
GitHubchinesespeople/cve-2026-52614

CVE-2026-52614

Ruoyi v4.8.3のバックエンドにSQLインジェクションの脆弱性があります。

リポジトリを見る
1111ヶ月前未レビュー

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

CVE-2026-52614 - RuoYi v4.8.3 filterKeyword バイパス SQLインジェクション

中文 | English

認証必須 / 許可されたテストのみ
このリポジトリはセキュリティ研究および許可されたテストのみを目的としています。明示的な許可なくシステムに対して使用しないでください。
本リポジトリはセキュリティ研究と明確に許可されたテストのみを目的としています。未承認システムに対しては使用しないでください。

日本語の説明

脆弱性の概要

RuoYi v4.8.3 のコード生成モジュールにある /tool/gen/createTable エンドポイントは、バックエンドユーザーがテーブル作成SQLを送信することを許可します。このエンドポイントは SqlUtil.filterKeyword() を呼び出してキーワードブラックリストによるフィルタリングを行いますが、実装では入力からすべての空白文字を削除した後、末尾にスペースを含むキーワード(例:select 、insert 、drop )と照合するため、関連ルールがヒットしません。

CREATE TABLE ... AS SELECT ...(CTAS)文を使用すると、Druid の MySqlCreateTableStatement 型チェックを通過しながら SELECT を実行できます。有効なバックエンドセッションを持つ攻撃者は、これを用いてブールベースのブラインドSQLインジェクションを構築し、データベースから機密情報を読み取り、データテーブルを作成できます。

影響条件

  • 対象が RuoYi v4.8.3 であること。
  • 攻撃者がバックエンドにログインし、有効な JSESSIONID を保持していること。
  • 現在のアカウントがコード生成モジュールの関連インターフェースにアクセスできること。
  • データベースおよび現在のデータベースアカウントが CTAS によるテーブル作成操作を許可していること。

脆弱性の原理

検証スクリプトは以下のロジックで sys_user テーブルの admin ユーザーのパスワードハッシュとソルトを抽出します。

  1. CTAS を用いて中間テーブルを作成し、login_name、password、salt フィールドをコピーします。
  2. 判定対象の各文字に対してテストテーブルを作成し、WHERE 句に SUBSTRING() 条件を追加します。
  3. 条件が真の場合、CTAS がデータを返すため、テストテーブルはコード生成テーブルリストに自動インポートされません。
  4. 条件が偽の場合、CTAS が0行を返すため、テストテーブルは自動インポートされ、/tool/gen/list 経由で確認できます。
  5. テストテーブルがリストに表示されるかどうかに基づいて、パスワードハッシュとソルトを1文字ずつ復元します。

環境要件

  • Python 3.8+
  • 有効かつ許可された RuoYi バックエンドセッション
  • Python 依存パッケージ:requests、urllib3

依存パッケージのインストール:

root@kitploit:~
python -m pip install requests urllib3

使用方法

exp.py を開き、ファイル上部の設定領域にある以下の2行を書き換えます。

root@kitploit:~
TARGET = "http://127.0.0.1:8080"
COOKIE = "JSESSIONID=your_session_id"

各項目の説明:

  • TARGET:テスト対象の RuoYi URL に置き換えます。(例:http://127.0.0.1:8080)
  • COOKIE:バックエンドにログイン後に取得した有効な JSESSIONID セッションに置き換えます。

書き換え後、直接実行します。

root@kitploit:~
python exp.py

スクリプトは対象データベース内に中間テーブルと多数のブール判定テストテーブルを作成します。隔離環境または明示的に許可された環境でのみ使用し、テスト完了後はデータベース管理者に生成されたテーブルの削除を依頼してください。

検証スクリーンショット

exp.png は許可されたローカル環境での成功検証スクリーンショットです。

Successful verification

修正推奨事項

  • SQLの安全性を文字列ブラックリストで判断せず、ましてやユーザーが送信したSQLを直接実行しないでください。
  • filterKeyword() の正規化および照合ロジックを修正してください。ただし、これを唯一の防御策としないでください。
  • コード生成インターフェースに対し、厳格な権限制御、操作監査、CSRF対策を実施してください。
  • 任意のSQLテーブル作成機能を禁止または削除し、業務上必要な場合は構造化パラメータから固定文を構築してください。
  • 最小権限のデータベースアカウントを使用し、機密テーブルの読み取りや不要なCTAS/DDL操作を制限してください。
  • 公式の修正済みバージョンにアップグレードするか、ベンダーのセキュリティパッチを適用してください。

英語(原文)

Summary

The /tool/gen/createTable endpoint in the code-generation module of RuoYi v4.8.3 accepts table-creation SQL from authenticated backend users. The endpoint calls SqlUtil.filterKeyword() to block dangerous SQL keywords. However, the implementation removes all whitespace from the input before checking blacklist entries that contain trailing spaces, such as select , insert , and drop . Those entries therefore cannot match the normalized input.

A CREATE TABLE ... AS SELECT ... (CTAS) statement can pass the Druid MySqlCreateTableStatement type check while still executing a SELECT. An attacker with a valid backend session may use this behavior for boolean-based blind SQL injection, sensitive-data extraction, and table creation.

Preconditions

  • The target runs RuoYi v4.8.3.
  • The tester has a valid authenticated backend JSESSIONID.
  • The authenticated account can access the code-generation endpoints.
  • The database and its configured account permit CTAS operations.

How the PoC Works

The script recovers the admin password hash and salt from sys_user using the following oracle:

  1. Create an intermediate table containing login_name, password, and salt.
  2. Create one test table per candidate character with a SUBSTRING() condition.
  3. When the condition is true, CTAS returns a row and the test table is not automatically imported into the generator table list.
  4. When the condition is false, CTAS returns zero rows and the table is automatically imported, making it visible through /tool/gen/list.
  5. Use that difference to recover the password hash and salt one character at a time.

Requirements

  • Python 3.8+
  • A valid, authorized RuoYi backend session
  • Python packages: requests, urllib3

Install dependencies:

root@kitploit:~
python -m pip install requests urllib3

Usage

Open exp.py and replace the following two lines in the configuration section near the top of the file:

root@kitploit:~
TARGET = "http://127.0.0.1:8080"
COOKIE = "JSESSIONID=your_session_id"

Where:

  • TARGET is the RuoYi base URL to test, for example http://127.0.0.1:8080.
  • COOKIE is a valid authenticated backend JSESSIONID session.

After replacing the URL and session, run:

root@kitploit:~
python exp.py

The script creates an intermediate table and many boolean-test tables in the target database. Use it only in an isolated or explicitly authorized environment, and have the database administrator remove the generated tables after testing.

Screenshot

exp.png shows a successful verification in an authorized local environment:

Successful verification

Mitigation

  • Do not rely on SQL keyword blacklists or execute user-supplied SQL directly.
  • Correct the normalization and matching logic in filterKeyword(), but do not treat it as the sole security control.
  • Apply strict authorization, auditing, and CSRF protection to code-generation endpoints.
  • Remove arbitrary SQL table creation; if required, construct fixed statements from structured, validated parameters.
  • Use a least-privileged database account that cannot read sensitive tables or perform unnecessary CTAS/DDL operations.
  • Upgrade to an officially fixed release or apply the vendor's security patch.

Files

  • exp.py - 検証スクリプト / verification script
  • exp.png - 検証成功スクリーンショット / successful verification screenshot
  • README.md - 日英バイリンガル脆弱性ドキュメント / bilingual vulnerability documentation
ツールをダウンロード