
Security scanner for CVE-2025-55182 - Critical RCE vulnerability in React Server Components. Scan npm/pnpm/yarn lockfiles, Docker images, SBOMs, and live URLs. Auto-fix, SARIF output, GitHub Actions, Vercel integration, and runtime protection middleware.
Security scanner for CVE-2025-55182 - a critical (CVSS 10.0) unauthenticated Remote Code Execution vulnerability in React Server Components.
⚠️ DISCLAIMER
This is a security scanner, NOT an exploit tool. It is designed to help developers and security teams identify vulnerable dependencies in their projects.
This is a community-driven open source project provided "AS IS" without warranty of any kind, express or implied. The authors and contributors are not responsible for any damages or security incidents arising from the use of this tool.
Use at your own risk and responsibility. Always verify findings manually and follow your organization's security policies. If you discover any issues, bugs, or have suggestions, please contribute back to help improve the project for everyone.
🤝 CONTRIBUTORS WANTED
This project is actively looking for testers and contributors! Whether you want to report bugs, suggest features, improve documentation, or submit code - all contributions are welcome. Check out our Contributing Guide to get started.
This project exists to help the community respond to CVE-2025-55182. We acknowledge and thank:
The fastest way to check if your project is vulnerable:
npx react2shell-guard .
That's it! This will scan your current directory and show results immediately.
npx react2shell-guard /path/to/your/project
Found vulnerabilities? Fix them automatically:
# Preview what will be changed
npx react2shell-guard fix --dry-run
# Apply fixes
npx react2shell-guard fix
# Apply fixes and reinstall dependencies
npx react2shell-guard fix --install
Check if a deployed application is vulnerable:
npx react2shell-guard scan-url https://your-app.com
Confirm your deployed fix is working:
npx react2shell-guard verify-patch https://your-app.com
Check if your Docker images contain vulnerable packages:
npx react2shell-guard scan-image myapp:latest
Automatically create a GitHub PR to fix vulnerabilities:
npx react2shell-guard create-pr --dry-run # Preview
npx react2shell-guard create-pr # Create PR
On November 29th, 2025, security researcher Lachlan Davidson discovered and responsibly disclosed a critical vulnerability in React Server Components. The flaw exists in how React decodes payloads sent to React Server Function endpoints, allowing unauthenticated attackers to achieve remote code execution on affected servers without any user interaction.
CVE-2025-55182 is rated CVSS 10.0 (Critical) and affects React Server Components (RSC) and frameworks using the RSC "Flight" protocol.
Affected Packages:
react-server-dom-webpack 19.0.0, 19.1.0-19.1.1, 19.2.0react-server-dom-parcel (same versions)react-server-dom-turbopack (same versions)next 15.0.0-15.0.4, 15.1.0-15.1.8, 15.2.0-15.2.5, 15.3.0-15.3.5, 15.4.0-15.4.7, 15.5.0-15.5.6, 16.0.0-16.0.6More Information:
For frequent use, install globally:
npm install -g react2shell-guard
Then use without npx:
react2shell-guard .
# Scan current directory
react2shell-guard .
# Scan specific directory
react2shell-guard /path/to/project
# Scan and ignore certain paths
react2shell-guard . --ignore-path "examples/**" "test/**"
# Human-readable text (default)
react2shell-guard .
# JSON output (for scripting)
react2shell-guard . --json
# SARIF output (for GitHub Security tab)
react2shell-guard . --sarif
# HTML report (standalone, shareable)
react2shell-guard . --html report.html
| Code | Meaning |
|---|---|
0 | No vulnerabilities found |
1 | Vulnerabilities detected |
2+ | Fatal error |
Scan live endpoints to detect if they are vulnerable:
# Scan a single URL
react2shell-guard scan-url https://example.com
# Batch scan from a file (one URL per line)
react2shell-guard scan-url urls.txt --list
# With options
react2shell-guard scan-url https://example.com --timeout 5000 --json
The scanner uses passive fingerprinting to detect vulnerable React Server Components endpoints without exploiting the vulnerability:
Probe Request: Sends a crafted POST request simulating an RSC Server Action call with a minimal payload:
multipart/form-data content type with RSC-like data structureNext-Action header to trigger Server Action processingResponse Analysis: Analyzes the HTTP response for vulnerability signatures:
^[0-9]+:E{ - RSC Flight protocol error format"digest":"...RSC - RSC digest in error responsesReactServerComponentsError - React error class namestext/x-component.*error - Component error content typeNon-Destructive: This is purely a detection mechanism - it does not execute any malicious payload or exploit the vulnerability. The probe uses benign data that triggers error responses on vulnerable servers but causes no harm.
Note: A positive detection means the server is running a vulnerable version and returned an RSC-specific error signature. It does NOT mean the server was exploited.
Verify if a target has been patched against the vulnerability:
# Verify patch status (runs multiple scans for accuracy)
react2shell-guard verify-patch https://example.com
# With JSON output
react2shell-guard verify-patch https://example.com --json
Patch verification performs multiple consecutive scans (default: 3) with brief delays between them to ensure accurate detection:
This multi-scan approach reduces false positives from transient network issues and provides higher confidence in the patch status.
| Option | Description |
|---|---|
--timeout <ms> | Request timeout in milliseconds (default: 10000) |
--json | Output results as JSON |
--skip-ssl-verify | Skip SSL certificate verification |
Scan Docker/OCI container images for vulnerable packages:
# Scan a local or remote image
react2shell-guard scan-image myapp:latest
# Scan from a registry
react2shell-guard scan-image registry.example.com/myapp:v1.0
# Skip pulling (use local image only)
react2shell-guard scan-image myapp:latest --skip-pull
# With JSON output
react2shell-guard scan-image myapp:latest --json
# With SARIF output
react2shell-guard scan-image myapp:latest --sarif
Requirements:
Block vulnerable deployments before they reach production:
# Run as part of your build command
react2shell-guard vercel-check
# In package.json
{
"scripts": {
"vercel-build": "react2shell-guard vercel-check && next build"
}
}
# Or in vercel.json
{
"buildCommand": "npx react2shell-guard vercel-check && npm run build"
}
| Option | Description |
|---|---|
--no-fail | Warn but do not fail the build on vulnerabilities |
--ignore-path <patterns> | Paths to ignore (glob patterns) |
--debug | Enable debug output |
Automatically create a pull request to fix vulnerabilities:
# Preview what will be done
react2shell-guard create-pr --dry-run
# Create branch and PR
react2shell-guard create-pr
# Create branch but don't push/create PR
react2shell-guard create-pr --no-push
# Custom branch name
react2shell-guard create-pr --branch fix/security-update
| Option | Description |
|---|---|
--branch <name> | Branch name for the fix (default: fix/cve-2025-55182) |
--dry-run | Show what would be done without making changes |
--no-push | Create branch and commits but do not push or create PR |
Requirements:
react2shell-guard - CVE-2025-55182 Scanner
──────────────────────────────────────────────────
Scanned 1 project(s)
✗ my-app [VULNERABLE]
Path: /path/to/my-app
Framework: nextjs v15.2.1
App Router: Yes (RSC enabled)
Vulnerabilities found:
- react-server-dom-webpack @ 19.1.0
Upgrade to: 19.1.2
Advisory: https://react.dev/blog/2025/12/03/...
- next @ 15.2.1
Upgrade to: 15.2.6
Advisory: https://react.dev/blog/2025/12/03/...
──────────────────────────────────────────────────
VULNERABLE - Action required!
Upgrade affected packages to patched versions immediately.
Note: We actively release new versions with improved detection patterns and fixes. Use
@v1for stable releases or@latestfor the newest version.
The easiest way to integrate is using our official GitHub Action:
name: Security Scan
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Scan for CVE-2025-55182
uses: gensecaihq/react2shell-scanner@v1
with:
path: '.'
fail-on-vuln: true
name: Security Scan
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
permissions:
security-events: write # For SARIF upload
pull-requests: write # For PR comments
steps:
- uses: actions/checkout@v4
- name: Scan for CVE-2025-55182
uses: gensecaihq/react2shell-scanner@v1
with:
path: '.'
format: sarif
fail-on-vuln: true
upload-sarif: true # Upload to GitHub Security tab
add-pr-comment: true # Comment on PRs with results
ignore-paths: 'examples/**,test/fixtures/**'
- name: Scan Docker image
uses: gensecaihq/react2shell-scanner@v1
with:
scan-type: container
container-image: myapp:latest
- name: Scan SBOM
uses: gensecaihq/react2shell-scanner@v1
with:
scan-type: sbom
sbom-file: sbom.json
If you prefer to use the CLI directly:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Scan for vulnerabilities
run: npx react2shell-guard@latest .
react2shell-guard automatically detects and parses lockfiles from:
package-lock.json (v2 and v3 formats)pnpm-lock.yamlyarn.lock (Classic and Berry formats)Automatically update your package.json to use patched versions:
# Preview changes (dry run)
react2shell-guard fix --dry-run
# Apply fixes
react2shell-guard fix
# Apply fixes and run npm/pnpm/yarn install
react2shell-guard fix --install
Install git hooks to prevent committing vulnerable dependencies:
# Auto-detect hook framework and install
react2shell-guard init-hooks
# Preview what would be installed
react2shell-guard init-hooks --dry-run
# Force specific hook type
react2shell-guard init-hooks --hook-type husky
react2shell-guard init-hooks --hook-type lefthook
react2shell-guard init-hooks --hook-type standalone
Supported hook frameworks:
.husky/pre-commitlefthook.yml.git/hooks/pre-commitThe hook will block commits when package.json contains vulnerable dependencies and suggest running react2shell-guard fix to remediate.
Scan CycloneDX SBOM files for vulnerabilities:
# Scan a CycloneDX SBOM
react2shell-guard scan-sbom bom.json
# With JSON output
react2shell-guard scan-sbom bom.json --json
# With SARIF output
react2shell-guard scan-sbom bom.json --sarif
Start the Model Context Protocol server for AI assistant integration:
react2shell-guard mcp-server
Available MCP tools:
scan_repo - Scan a repository for vulnerabilitiesscan_sbom - Scan a CycloneDX SBOM fileConfigure with MCP-compatible clients (example configuration):
{
"mcpServers": {
"react2shell-guard": {
"command": "npx",
"args": ["react2shell-guard", "mcp-server"]
}
}
}
Defense-in-depth middleware that detects and blocks CVE-2025-55182 exploit attempts at runtime.
import express from 'express';
import { createExpressMiddleware } from 'react2shell-guard/middleware';
const app = express();
// Add raw body parser for RSC payloads
app.use(express.raw({ type: 'text/x-component' }));
app.use(express.json());
// Add protection middleware
app.use(createExpressMiddleware({
action: 'block', // 'block' | 'log' | 'alert'
onAlert: (result, req) => {
// Send to your alerting system (Slack, PagerDuty, etc.)
console.error('CVE-2025-55182 exploit attempt:', result);
},
skipPaths: ['/health', '/metrics'],
}));
// middleware.ts
import { withReact2ShellGuard } from 'react2shell-guard/middleware';
export const middleware = withReact2ShellGuard({
action: 'block',
rscEndpointsOnly: true, // Only check RSC endpoints (recommended)
});
export const config = {
matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
};
Detected patterns:
import { scan } from 'react2shell-guard';
const result = scan({
path: '/path/to/project',
ignorePaths: ['examples/**'],
debug: false,
});
console.log(result.vulnerable); // boolean
console.log(result.projects); // ProjectResult[]
{
"cve": "CVE-2025-55182",
"vulnerable": true,
"scanTime": "2025-12-04T10:30:00Z",
"projects": [
{
"name": "my-app",
"path": "/path/to/my-app",
"framework": {
"type": "nextjs",
"version": "15.2.1",
"appRouterDetected": true
},
"findings": [
{
"package": "react-server-dom-webpack",
"currentVersion": "19.1.0",
"fixedVersion": "19.1.2",
"severity": "critical",
"advisoryUrl": "https://..."
}
],
"vulnerable": true
}
],
"errors": []
}
Automatic fix (recommended):
react2shell-guard fix --install
Manual upgrade - React packages:
npm install [email protected] # or 19.0.1, 19.2.1
Manual upgrade - Next.js:
npm install [email protected] # or other patched version for your release line
Fixed Next.js versions by release line:
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Run in development mode
npm run dev
MIT
| Option | Description |
|---|
--json | Output results as JSON |
--sarif | Output results as SARIF 2.1.0 |
--html <file> | Generate standalone HTML report |
--no-exit-on-vuln | Don't exit with code 1 when vulnerabilities found |
--ignore-path <patterns> | Paths to ignore (e.g., examples/**) |
--debug | Enable debug output |
| Option | Description |
|---|
--list | Treat target as a file containing URLs |
--threads <n> | Number of concurrent threads (default: 10) |
--timeout <ms> | Request timeout in milliseconds (default: 10000) |
--json | Output results as JSON |
--skip-ssl-verify | Skip SSL certificate verification |
--verbose | Show all results including non-vulnerable hosts |
| Option | Description |
|---|
--timeout <ms> | Operation timeout in milliseconds (default: 120000) |
--skip-pull | Skip pulling image from registry (use local only) |
--json | Output results as JSON |
--sarif | Output results as SARIF 2.1.0 |
--no-exit-on-vuln | Don't exit with code 1 when vulnerabilities found |
--debug | Enable debug output |
| Input | Description | Default |
|---|
path | Path to scan | . |
scan-type | Type of scan: repo, sbom, container | repo |
format | Output format: text, json, sarif | text |
fail-on-vuln | Fail if vulnerabilities found | true |
upload-sarif | Upload SARIF to GitHub Security | false |
add-pr-comment | Add PR comment with results | false |
ignore-paths | Comma-separated paths to ignore | '' |
sbom-file | SBOM file path (when scan-type is sbom) | '' |
container-image | Docker image (when scan-type is container) | '' |
| Output | Description |
|---|
vulnerable | Whether vulnerabilities were found (true/false) |
findings-count | Number of vulnerable packages |
scan-result | Full scan result (JSON format) |
sarif-file | Path to SARIF output file |