Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2025-55182-poc — Proof of Concept for CVE-2025-55182 ("React2Shell"). A fully dockerized environment demonstrating Remote Code Execution (RCE) via insecure deserialization in React Server Components. Includes vulnerable targets for both Vanilla React (Express) and Next.js, along with a custom Python exploit script. | Kitploit
Tools/GitHubGitHub/trax69/cve-2025-55182-poc
Vulnerability AnalysisExploitationWeb Application ExploitationCTFPenetration TestingLearning & EducationPayload DevelopmentBinary ExploitationLabs & Practice
GitHubtrax69/cve-2025-55182-poc

cve-2025-55182-poc

View Repository
49 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →

About

Proof of Concept for CVE-2025-55182 ("React2Shell"). A fully dockerized environment demonstrating Remote Code Execution (RCE) via insecure deserialization in React Server Components. Includes vulnerable targets for both Vanilla React (Express) and Next.js, along with a custom Python exploit script.

Share

CVE-2025-55182 (React2Shell) - Academic Proof of Concept

⚠️ DISCLAIMER: EDUCATIONAL USE ONLY This repository contains functional exploit code for a critical vulnerability (CVSS 10.0). It is intended strictly for academic research, security analysis, and educational purposes. Do not use this code against systems you do not own or have explicit permission to test. The author is not responsible for any misuse.

📄 Abstract

This project documents and demonstrates CVE-2025-55182, a critical Remote Code Execution (RCE) vulnerability residing in the React Server Components (RSC) architecture. Often referred to as "React2Shell", this flaw allows unauthenticated remote attackers to execute arbitrary code on the server by manipulating the "Flight" serialization protocol used by react-server.

This laboratory provides a controlled, isolated Docker environment to analyze the vulnerability in two distinct scenarios:

  1. Vanilla RSC: A raw implementation using react-server-dom-webpack and Express.
  2. Next.js: A standard deployment using a vulnerable version of the Next.js App Router.

🏗️ Architecture

The environment is orchestrated via Docker Compose and consists of three isolated containers connected by a private internal network (research-net).

ServiceContextDescriptionVulnerable Component
vanilla-targetvanilla-rsc/Minimal Express server manually implementing the RSC protocol.[email protected]
nextjs-targetnextjs-app/Standard Next.js application using App Router.[email protected] (impl. react-server)
attackerexploit/Python environment containing the exploit scripts.N/A

Technical Root Cause

The vulnerability stems from Insecure Deserialization (CWE-502) within the Flight protocol parser. By injecting a crafted multipart payload containing a "fake" chunk structure, an attacker can:

  1. Pollute the Prototype: Overwrite the .then property of a promise-like object.
  2. Trigger Gadget Chains: Force the server to traverse an internal gadget chain (referencing $B blobs).
  3. Execute Code: Reach the Function() constructor to compile and execute arbitrary JavaScript (e.g., child_process.execSync).

🚀 Getting Started

Prerequisites

  • Docker & Docker Compose
  • Git

Installation & Deployment

  1. Clone the repository:

    root@kitploit:~
    git clone https://github.com/trax69/cve-2025-55182-poc.git
    cd cve-2025-55182-poc
    
  2. Build and launch the laboratory:

    root@kitploit:~
    docker-compose up -d --build
    

    Wait for the containers to fully initialize. The Next.js container may take a few minutes to complete its first build.

💥 Exploitation

The exploitation logic is encapsulated in exploit/exploit.py. You can run attacks from your host machine (if Python is installed) or directly from the attacker container.

Method A: Running from the Attacker Container (Recommended)

  1. Access the attacker shell:

    root@kitploit:~
    docker-compose exec attacker bash
    
  2. Install requeriments:

    root@kitploit:~
    pip install -r requirements.txt
    
  3. Attack Target A (Vanilla React):

    root@kitploit:~
    python exploit.py http://vanilla-target:4000/rsc vanilla
    
  4. Attack Target B (Next.js):

    root@kitploit:~
    python exploit.py http://nextjs-target:3000/ nextjs
    

Verification

The exploit attempts to create a file named pwned.txt inside the /tmp directory of the victim server. To verify success:

root@kitploit:~
# Check Vanilla Server
docker-compose exec vanilla-target ls -la /tmp/pwned.txt

# Check Next.js Server
docker-compose exec nextjs-target ls -la /tmp/pwned.txt

If successful, you will see the file listing. If the exploit fails, the file will not exist.

🛡️ Mitigation

To remediate this vulnerability in production environments:

  1. React: Upgrade react-server-dom-webpack (and related packages) to version 19.0.1, 19.1.2, or 19.2.1+.
  2. Next.js: Upgrade to v15.0.5+ or v16.0.7+.
  3. WAF: Implement rules to block requests containing signatures like "$1:__proto__" or unusual usages of "$@" in multipart bodies.

📚 References

  • (https://nvd.nist.gov/vuln/detail/CVE-2025-55182)
  • (https://github.com/msanft/CVE-2025-55182)

University Project - Security Audit & Vulnerability Research

Download Tool