Exploit database

GH-4ab5825ac50cb2a0efe42ffe867e223f

cerberusmrxi/cerberus-react2shell-scanner-exploit

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2025-55182

257 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files3

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lab/vulnerable-app/app/actions.js

JavaScript · 2,042 bytes
'use server'

/**
 * INTENTIONALLY VULNERABLE Server Actions
 * Educational demonstration of unsafe Server Actions
 * DO NOT use this pattern in production code!
 */

import { exec } from 'child_process';
import { promisify } from 'util';

const execAsync = promisify(exec);

export async function submitForm(formData) {
  const data = Object.fromEntries(formData);
  
  return {
    success: true,
    message: `Form submitted with: ${JSON.stringify(data)}`,
    timestamp: new Date().toISOString()
  };
}

export async function processData(data) {
  return {
    processed: true,
    input: data,
    serverTime: new Date().toISOString()
  };
}

/**
 * CRITICAL VULNERABILITY: This action executes arbitrary commands
 * This is intentionally insecure for educational/testing purposes
 */
export async function executeCommand(command) {
  try {
    // UNSAFE: Executes arbitrary shell commands
    const { stdout, stderr } = await execAsync(command);
    
    return {
      success: true,
      output: stdout,
      error: stderr,
      executedAt: new Date().toISOString()
    };
  } catch (error) {
    return {
      success: false,
      output: '',
      error: error.message,
      executedAt: new Date().toISOString()
    };
  }
}

/**
 * ANOTHER VULNERABILITY: Unsafe eval pattern
 * DO NOT use this in real applications!
 */
export async function executeTask(taskData) {
  // Check if taskData has a command field
  if (taskData && typeof taskData === 'object' && taskData.cmd) {
    try {
      const { stdout, stderr } = await execAsync(taskData.cmd);
      return {
        status: 'completed',
        task: taskData,
        output: stdout,
        error: stderr,
        executedAt: new Date().toISOString()
      };
    } catch (error) {
      return {
        status: 'error',
        task: taskData,
        output: '',
        error: error.message,
        executedAt: new Date().toISOString()
      };
    }
  }
  
  return {
    status: 'completed',
    task: taskData,
    executedAt: new Date().toISOString()
  };
}