Ninja Tables 5.5.1以下 - dateFormatパラメータを介した認証不要のSQLインジェクション
元情報の公開:2026/11/26 06:04 / 元情報の更新:2026/11/26 18:33(日本時間)
日本語訳
WordPress用プラグイン「Ninja Tables – Responsive Table Builder for Data, Pricing & Product Tables」は、5.5.1以下のバージョンで、列のメタデータのdateFormatパラメータを介したSQLインジェクションの脆弱性があります。DefaultProvider::orderByJsonQuery()で保存済みdateFormat値のエスケープが不十分なことが原因です。convertDateFormatToMysql()は日付書式のトークンに対してstr_replaceを行うだけで、一重引用符を含むSQLの特殊文字をそのまま残します。その後、この値が一重引用符に囲まれた状態でorderByRaw()のORDER BY句へ直接連結されます。
認証されていない攻撃者が既存のクエリにSQLクエリを追加し、データベースから機密情報を取得できます。ペイロードは_ninja_table_columns投稿メタへ保存され、テーブルが日付列でsorting_type='by_column'を使っていると、wp_ajax_ninja_tables_public_action AJAXエンドポイントへの認証なしのリクエストのたびに実行されます。
原文(英語)
Ninja Tables <= 5.5.1 - Unauthenticated SQL Injection via 'dateFormat' Parameter
The Ninja Tables – Responsive Table Builder for Data, Pricing & Product Tables plugin for WordPress is vulnerable to SQL Injection via the 'dateFormat' column metadata parameter in versions up to, and including, 5.5.1 This is due to insufficient escaping on the stored 'dateFormat' value in DefaultProvider::orderByJsonQuery(); convertDateFormatToMysql() only performs str_replace on date-format tokens and leaves SQL metacharacters (including single quotes) intact, after which the value is concatenated directly into an orderByRaw() ORDER BY clause inside single quotes. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database; the payload is stored in the _ninja_table_columns post meta and executed on every unauthenticated request to the wp_ajax_ninja_tables_public_action AJAX endpoint when the table uses sorting_type='by_column' with a date column.
引用元:Wordfence
確認と対応の進め方
WordPress管理画面の「プラグイン」→「インストール済みプラグイン」で、対象製品の名前とバージョンを確認してください。
影響バージョンに該当する場合は、バックアップを確認し、「ダッシュボード」→「更新」から対象製品を更新してください。更新後は、記事に記載した修正版になっていることと、サイトの表示・機能を確認してください。
更新が表示されない場合は、製品の提供元で更新情報と更新方法を確認してください。