
Passive vulnerability scanner for CVE-2025-55182 and CVE-2025-66478, detecting unauthenticated RCE in React Server Components via framework fingerprinting, version analysis, and RSC endpoint probing.
React Server Components Flight Protocol Remote Code Execution Detection Tool
This scanner identifies systems potentially vulnerable to CVE-2025-55182 (React) and CVE-2025-66478 (Next.js), critical unauthenticated remote code execution vulnerabilities in the React Server Components (RSC) "Flight" protocol.
Key Risk Factors:
A critical insecure deserialization vulnerability in React's Server Components implementation. The RSC "Flight" protocol fails to properly validate the structure and types of incoming payloads, allowing attackers to inject malicious data that influences server-side execution.
| Package | Vulnerable Versions | Patched Versions |
|---|---|---|
| react-server-dom-webpack | 19.0.0, 19.1.0, 19.1.1, 19.2.0 | 19.0.1, 19.1.2, 19.2.1 |
| react-server-dom-parcel | 19.0.0, 19.1.0, 19.1.1, 19.2.0 | 19.0.1, 19.1.2, 19.2.1 |
| react-server-dom-turbopack | 19.0.0, 19.1.0, 19.1.1, 19.2.0 | 19.0.1, 19.1.2, 19.2.1 |
| Next.js | 14.3.0-canary.77+, 15.x, 16.0.0-16.0.6 | 15.0.5, 15.1.9, 15.2.6, 15.3.6, 15.4.8, 15.5.7, 16.0.7 |
Attacker → Crafted HTTP POST → RSC Endpoint → Deserialization → RCE
The attack requires only a specially crafted HTTP request to any Server Function endpoint. No authentication is needed, and default configurations are vulnerable.
The scanner uses passive fingerprinting and protocol probing to identify potentially vulnerable systems. It does NOT attempt exploitation.
┌─────────────────────────────────────────────────────────────────┐
│ DETECTION PIPELINE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 1. Framework Detection │
│ ├── HTTP Headers (X-Powered-By: Next.js) │
│ ├── Page Source (__NEXT_DATA__, react artifacts) │
│ └── Build Manifests │
│ │
│ 2. Version Fingerprinting │
│ ├── Embedded version strings in JS bundles │
│ ├── Package version patterns │
│ └── Build manifest analysis │
│ │
│ 3. RSC Endpoint Discovery │
│ ├── Send RSC headers (RSC: 1, Accept: text/x-component) │
│ ├── Analyze response Content-Type │
│ └── Detect Flight protocol markers in response │
│ │
│ 4. Server Actions Probing │
│ ├── POST request with minimal Flight payload │
│ ├── Check for deserialization processing │
│ └── Identify action endpoints │
│ │
│ 5. Vulnerability Assessment │
│ ├── Correlate version with known vulnerable ranges │
│ ├── Weight RSC endpoint presence │
│ └── Generate confidence-scored verdict │
│ │
└─────────────────────────────────────────────────────────────────┘
| Indicator | Detection Method | Confidence |
|---|---|---|
X-Powered-By: Next.js | HTTP header inspection | High |
__NEXT_DATA__ script tag | HTML source parsing | High |
/_next/ asset paths | HTML source parsing | Medium |
| React hydration markers | HTML source parsing | Medium |
The Flight protocol uses a specific wire format:
0:["$","div",null,{"children":"Hello"}]
1:["$","$L1",null,{}]
2:{"name":"ServerComponent"}
The scanner looks for:
text/x-component Content-Type{number}:{payload}$, $L, $F, $@, $undefinedSearches for version patterns in:
/_next/static/chunks/)[email protected])requests library# Clone or download the scanner files
# Install dependencies
pip install -r requirements.txt
# Verify installation
python3 cve-2025-55182-scanner.py --help
# Single target
python3 cve-2025-55182-scanner.py -t https://example.com
# With verbose output
python3 cve-2025-55182-scanner.py -t https://example.com -v
# Create targets file (one URL per line)
echo "https://app1.example.com" > targets.txt
echo "https://app2.example.com" >> targets.txt
# Scan all targets
python3 cve-2025-55182-scanner.py -f targets.txt -o results.json
python3 cve-2025-55182-scanner.py -t https://example.com \
--timeout 15 \
--threads 10 \
--user-agent "SecurityAudit/1.0" \
-v \
-o scan_results.json
| Option | Description | Default |
|---|---|---|
-t, --target | Single target URL | - |
-f, --file | File with target list | - |
-o, --output | JSON output file | - |
-v, --verbose | Show detailed evidence | False |
--timeout | Request timeout (seconds) | 10 |
--threads | Concurrent threads | 5 |
--verify-ssl | Verify SSL certificates | False |
--user-agent | Custom User-Agent | Mozilla/5.0... |
--no-banner | Suppress banner | False |
For deeper protocol analysis:
python3 rsc_analyzer.py https://example.com 2>/dev/null
This provides detailed Flight protocol analysis and component enumeration.
| Status | Meaning | Action Required |
|---|---|---|
| 🔴 VULNERABLE | Confirmed vulnerable version detected | Immediate patching |
| 🔴 LIKELY_VULNERABLE | React 19.x with RSC, version in vulnerable range | Urgent patching |
| 🟡 POTENTIALLY_VULNERABLE | RSC endpoints found, version unknown | Investigate & patch |
| 🟢 NOT_VULNERABLE | Patched version confirmed | Monitor for updates |
| 🔵 UNKNOWN | Could not determine status | Manual verification needed |
| ⚪ ERROR | Scan failed | Retry or manual check |
======================================================================
Target: https://app.example.com
Status: VULNERABLE
Framework: Next.js
Version: 19.1.0
RSC Endpoints: /, /_next/data
Evidence:
- X-Powered-By header: Next.js
- React version detected: 19.1.0
- RSC Flight response at / (Content-Type: text/x-component)
- Flight protocol markers detected at /
Recommendations:
→ CRITICAL: Immediate patching required!
→ Upgrade React to 19.0.1, 19.1.2, or 19.2.1
→ Upgrade Next.js to latest patched version (15.0.5+, 16.0.7)
→ Enable WAF rules to block malicious RSC payloads
→ Monitor for anomalous POST requests to RSC endpoints
======================================================================
{
"target": "https://app.example.com",
"status": "VULNERABLE",
"framework": "Next.js",
"version": "19.1.0",
"rsc_endpoints": ["/", "/_next/data"],
"evidence": [
"X-Powered-By header: Next.js",
"React version detected: 19.1.0",
"RSC Flight response at / (Content-Type: text/x-component)"
],
"recommendations": [
"CRITICAL: Immediate patching required!",
"Upgrade React to 19.0.1, 19.1.2, or 19.2.1"
]
}
| Result Type | Confidence | Explanation |
|---|---|---|
| VULNERABLE with version | HIGH (90%+) | Version string matched known vulnerable version |
| VULNERABLE via header | HIGH (85%+) | X-Powered-By exposed vulnerable version |
| LIKELY_VULNERABLE | MEDIUM-HIGH (70-85%) | React 19.x detected, RSC active, version not explicitly patched |
| POTENTIALLY_VULNERABLE | MEDIUM (50-70%) | RSC endpoints respond, but version unknown |
| NOT_VULNERABLE | HIGH (85%+) | Patched version explicitly detected |
| UNKNOWN | LOW (<50%) | Insufficient information gathered |
✅ Explicit version string found in bundles
✅ X-Powered-By header exposes version
✅ Multiple RSC indicators present
✅ Flight protocol response confirmed
✅ Server accepts RSC POST requests
❌ No version information exposed
❌ WAF/CDN masking responses
❌ Custom framework implementation
❌ Heavy caching preventing probes
❌ Rate limiting blocking detection
| Scenario | Why It Happens | Mitigation |
|---|---|---|
| Old version string cached | CDN/build cache | Check multiple endpoints |
| RSC disabled post-update | Config change without rebuild | Verify build date |
| Non-standard RSC implementation | Custom framework | Manual verification |
| Scenario | Why It Happens | Mitigation |
|---|---|---|
| Version stripped from bundles | Production optimization | Check build manifests |
| WAF blocking probes | Security controls | Test from allowed IP |
| RSC on non-standard paths | Custom routing | Expand path wordlist |
| SPA without SSR indicators | Client-only rendering | Check API endpoints |
| Factor | Impact on Detection |
|---|---|
| Cloudflare/WAF | May block probes, mask headers |
| CDN Caching | May serve stale version info |
| Load Balancers | May route to different app versions |
| Kubernetes/Containers | Each pod may differ |
| Feature Flags | RSC may be conditionally enabled |
For critical findings, always validate with:
npm audit or yarn auditImmediate Actions (0-24 hours):
Patch immediately
npm install [email protected] [email protected]
npm install [email protected] # or latest patched
Enable WAF rules - Cloudflare, Akamai, and AWS WAF have deployed protective rules
Monitor logs for suspicious POST requests to RSC endpoints
Short-term Actions (24-72 hours):
package.json# Batch scan all company assets
cat domains.txt | while read domain; do
python3 cve-2025-55182-scanner.py -t "$domain" -o "results_${domain//\//_}.json"
done
# Aggregate results
jq -s '[.[] | select(.status == "VULNERABLE" or .status == "LIKELY_VULNERABLE")]' results_*.json > critical_findings.json
# GitHub Actions example
- name: CVE-2025-55182 Check
run: |
python3 cve-2025-55182-scanner.py -t ${{ env.APP_URL }} -o results.json
if grep -q '"status": "VULNERABLE"' results.json; then
echo "::error::Critical vulnerability detected!"
exit 1
fi
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2025-12-03 | Initial release |
This tool is provided for authorized security testing only. Only use against systems you own or have explicit written permission to test. The authors assume no liability for misuse or damage caused by this tool.