WPForms 2.0.4以下 - 決済フォームの複数選択フィールドのOther値を介した認証不要の保存型クロスサイトスクリプティング
元情報の公開:2026/11/26 12:35 / 元情報の更新:2026/11/27 00:47(日本時間)
日本語訳
WordPress用プラグイン「WPForms(Contact Form by WPForms / wpforms-lite)」は、2.0.4以下のすべてのバージョンで、入力のサニタイズと出力のエスケープが不十分なため、決済フォームの複数選択フィールドにある「Other」選択肢の値を介した保存型クロスサイトスクリプティングの脆弱性があります。認証されていない攻撃者が任意のウェブスクリプトをページに埋め込み、管理者などの権限を持つユーザーが「WPForms > Payments」の詳細ページで注入先の決済エントリーへアクセスすると、スクリプトを実行させることができます。
送信値はsanitize_text_field()を通じて保存されますが、strip_tags()は「<」の直後に空白がある表記を無視するため、空白で区切った疑似タグが残ります。例として、< i class="wpforms-single-payment-tooltip" data-tooltip-content="<img src=x onerror=...>">x< /i>のような値が該当します。
管理画面の決済エントリーページでは、その値が「post」許可リストを使うwp_kses()を通じて出力されます。その際、class属性とdata-*属性を保ったまま、実際に機能するi要素へ正規化されます。さらに、同梱のTooltipsterの初期化処理(contentAsHTMLとcontentCloning)が属性内のHTMLを描画するため、マウスを重ねる操作がなくても、ページの読み込み時にスクリプトが実行されます。
原文(英語)
WPForms <= 2.0.4 - Unauthenticated Stored Cross-Site Scripting via Multiple Choice 'Other' Option Value on Payment Forms
The WPForms (Contact Form by WPForms / wpforms-lite) plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the Multiple Choice field's 'Other' option value on payment forms in all versions up to, and including, 2.0.4 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a privileged user such as an administrator accesses the injected payment entry on the WPForms > Payments details page. The submitted value is stored via sanitize_text_field(), which preserves a space-separated pseudo-tag (e.g. '< i class="wpforms-single-payment-tooltip" data-tooltip-content="<img src=x onerror=...>">x< /i>') because strip_tags() ignores a '<' followed by whitespace; on the admin Payments entry page the value is output through wp_kses() with the 'post' allowlist, which normalizes it into a live <i> element retaining its class and data-* attributes, and the bundled Tooltipster initialization (contentAsHTML + contentCloning) then renders the attribute's HTML, executing the script on page load without any hover.
引用元:Wordfence
確認と対応の進め方
WordPress管理画面の「プラグイン」→「インストール済みプラグイン」で、対象製品の名前とバージョンを確認してください。
影響バージョンに該当する場合は、バックアップを確認し、「ダッシュボード」→「更新」から対象製品を更新してください。更新後は、記事に記載した修正版になっていることと、サイトの表示・機能を確認してください。
更新が表示されない場合は、製品の提供元で更新情報と更新方法を確認してください。