Simple Download Monitor 4.1.5 以下 - 認証不要のパス・トラバーサルによるファイル読み取り('sdm_upload' パラメータ経由)
元情報の公開:2026/12/01 02:26 / 元情報の更新:2026/12/01 14:30(日本時間)
日本語訳
WordPress 用 Simple Download Monitor プラグインは、`sdm_upload` パラメータを介したパス・トラバーサル脆弱性が、バージョン 4.1.5 以下のすべてのバージョンに存在します。
この脆弱性は、`SDM_Utils_File_System_Related::get_uploaded_file_path_from_url()` が、保存されたダウンロード URL から固定長の文字列を削除するだけで、URL が期待される `$wp_content_url` プレフィックスで始まっているかを検証せず、`realpath()` 後のパスが sdm-uploads ディレクトリ内に留まっているかのチェックを行わず、さらに `SDM_File_Protection_Handler::contains_protected_dirname()` が URL 中の任意の位置にある `uploads/sdm-uploads` という文字列に正規表現でマッチするだけで構造的なプレフィックスを強制しないこと、そして保存パスに対する `esc_url_raw()` が `../` シーケンスをそのまま残すことに起因します。
その結果、管理者権限を持つ認証済み攻撃者(プラグインの「管理ダッシュボードアクセス権限」設定が緩められている場合はそれ以下の権限でも可)は、`sdm_downloads` 投稿の `sdm_upload` フィールドに細工されたトラバーサル URL を保存でき、認証されていない訪問者が単一の GET リクエスト `/?sdm_process_download=1&download_id=N` を送るだけで、アップロードディレクトリ外の PHP 以外のサーバファイル(`.bak`、`.log`、`.sql`、`.sqlite`、`.conf`、`.ini`、`.inc`、`.zip` など、wp-config.php のバックアップやデータベースダンプ、デバッグログを含む)をストリーミングできるようになります。
PHP、CGI、実行可能ファイルの拡張子はプラグインのブロックリストで除外されていますが、上記のファイル種別はブロック対象に含まれておらず、ダウンロードストリーミングエンドポイントで認証や権限チェックも実施されていません。
原文(英語)
Simple Download Monitor <= 4.1.5 - Unauthenticated Path Traversal to File Read via 'sdm_upload' Parameter
The Simple Download Monitor plugin for WordPress is vulnerable to Path Traversal in all versions up to, and including, 4.1.5 via the `sdm_upload` parameter. The vulnerability exists because `SDM_Utils_File_System_Related::get_uploaded_file_path_from_url()` strips a fixed number of characters from the stored download URL without verifying the URL begins with the expected `$wp_content_url` prefix, performs no post-`realpath()` containment check to confirm the resolved path stays within the sdm-uploads directory, and relies on `SDM_File_Protection_Handler::contains_protected_dirname()` — a substring regex that matches `uploads/sdm-uploads` anywhere in the URL rather than enforcing a structural prefix — while `esc_url_raw()` on the save path leaves `../` sequences intact. This makes it possible for authenticated attackers with Administrator-level access (or lower, if the site owner has reduced the plugin's "Admin Dashboard Access Permission" setting) to store a crafted traversal URL in an sdm_downloads post's `sdm_upload` field, enabling any unauthenticated visitor to subsequently stream non-PHP server files outside the uploads directory — including `.bak`, `.log`, `.sql`, `.sqlite`, `.conf`, `.ini`, `.inc`, and `.zip` files such as wp-config.php backups, database dumps, and debug logs — via a single GET request to `/?sdm_process_download=1&download_id=N`. PHP, CGI, and executable file extensions are blocked by the plugin's extension blocklist, but that blocklist does not cover the file types listed above, and no authentication or capability check is enforced at the download-streaming endpoint.
引用元:Wordfence
確認と対応の進め方
WordPress管理画面の「プラグイン」→「インストール済みプラグイン」で、対象製品の名前とバージョンを確認してください。
影響バージョンに該当する場合は、バックアップを確認し、「ダッシュボード」→「更新」から対象製品を更新してください。更新後は、記事に記載した修正版になっていることと、サイトの表示・機能を確認してください。
更新が表示されない場合は、製品の提供元で更新情報と更新方法を確認してください。