Skip to content

nischitpatel/react2shell

Repository files navigation

react2shell (Educational Security Research)

⚠️ WARNING: This project is intentionally vulnerable. Do NOT deploy it publicly.

Overview

react2shell is an educational security research project demonstrating how unsafe deserialization and trust boundary violations in server-side frameworks can lead to Remote Code Execution (RCE).

The project is built using Next.js 16 Server Actions and showcases how malformed client input, when improperly validated, can execute unintended server-side logic.

This repository is strictly for learning and security awareness purposes.


References


What This Project Demonstrates

  • How Server Actions process multipart/form-data
  • Why deserializing untrusted input is dangerous
  • How JavaScript prototype pollution & thenable resolution can break application assumptions
  • How a seemingly harmless request can trigger server-side execution
  • Why RCE is considered a critical severity vulnerability

Key Security Concepts Covered

  • Remote Code Execution (RCE)
  • Trust boundaries (Client → Server)
  • Unsafe deserialization
  • Prototype pollution
  • Server-side JavaScript execution
  • Framework-level security assumptions

Observed Behavior

When a specially crafted request is sent:

  • The server logs unexpected output (meowmeow)
  • The execution occurs on the server, not in the browser
  • No authentication or authorization is required
  • The application runtime is compromised

This confirms server-side code execution.


Why This Is Dangerous

If deployed publicly, this class of vulnerability could allow an attacker to:

  • Execute arbitrary server commands
  • Read environment variables and secrets
  • Modify application source code
  • Access databases and internal services
  • Persist backdoors
  • Abuse cloud infrastructure

This is why such vulnerabilities receive CVSS scores of 9.8–10.0.


Safe Usage Guidelines

This project should only be run:

  • Locally
  • Inside a disposable environment (VM or Docker)
  • Without real credentials
  • Without internet access
  • Never on cloud platforms (Vercel, AWS, Render, Railway, etc.)

Educational Purpose Only

This repository exists to:

  • Improve understanding of modern web security risks
  • Demonstrate why framework internals matter
  • Encourage defensive programming
  • Promote secure API and action design

No production usage is intended or supported.


Disclaimer

The author assumes no responsibility for misuse of this code.

By using this repository, you acknowledge that:

  • You understand the risks
  • You will not deploy it publicly
  • You are using it solely for educational purposes

Notes

This project was built to deepen understanding of:

  • Next.js internals
  • Server Action security
  • Real-world vulnerability classes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published