{"exploit":{"id":"EDB-18804","name":"DIY CMS 1.0 Poll - SQL Injection (SQLi) / Cross-Site Scripting (XSS) / Cross-Site Request Forgery (CSRF)","description":"DIY CMS 1.0 Poll - SQL Injection (SQLi) / Cross-Site Scripting (XSS) / Cross-Site Request Forgery (CSRF)","cves":["CVE-2012-6519","CVE-2012-6518","CVE-2012-6517"],"author":"Vulnerability-Lab","published":"2012-04-30","platform":"php","type":"webapps","language":"Text","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/18804","path":"exploits/php/webapps/18804.txt","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-18804.txt","vulnerabilities":[{"id":"CVE-2012-6519","state":"PUBLISHED","title":null,"titleSource":null,"description":"SQL injection vulnerability in modules/poll/index.php in DIY-CMS 1.0 allows remote attackers to execute arbitrary SQL commands via the start parameter to mod.php.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2012-6519","cvss":null,"updatedAt":"2024-08-06T21:28:39.990Z","retrievedAt":"2026-11-26T19:30:43.860Z","stale":false,"error":"Some CVE details could not be refreshed"},{"id":"CVE-2012-6518","state":"PUBLISHED","title":null,"titleSource":null,"description":"Cross-site request forgery (CSRF) vulnerability in mod.php in DiY-CMS 1.0 allows remote attackers to hijack the authentication of administrators for requests that create a poll via an add action to the poll module.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2012-6518","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-2012-6518"},"updatedAt":"2024-08-06T21:28:39.949Z","retrievedAt":"2026-11-26T19:06:11.230Z","stale":false,"error":null},{"id":"CVE-2012-6517","state":"PUBLISHED","title":null,"titleSource":null,"description":"Multiple cross-site scripting (XSS) vulnerabilities in DiY-CMS 1.0 allow remote attackers to inject arbitrary web script or HTML via the (1) question parameter to in /modules/poll/add.php or (2) question or (3) answer parameter to modules/poll/edit.php.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2012-6517","cvss":{"version":"2.0","baseScore":4.3,"severity":"medium","vectorString":"AV:N/AC:M/Au:N/C:N/I:P/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2012-6517"},"updatedAt":"2024-08-06T21:28:39.918Z","retrievedAt":"2026-11-26T19:06:17.878Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-18804.png?v=2","url":"https://exploitbin.com/exploits/EDB-18804","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-18804/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-18804/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"Title:\n======\nDIY CMS v1.0 Poll - Multiple Web Vulnerabilities\n\n\nDate:\n=====\n2012-04-26\n\n\nReferences:\n===========\nhttp://www.vulnerability-lab.com/get_content.php?id=518\n\n\nVL-ID:\n=====\n518\n\n\nIntroduction:\n=============\nDo It Yourslef Content Management System is a feature-rich, php-built, mysql-based, opensource and free CMS.\nIt is suitable to manage any kind of contents. It is modular, extensible and easliy skinnable. Build your own modules\nfor specific\npurposes, add certain functionalites to suit your needs and design a theme that represents the content of your website.\n\n(Copy of the Vendor Homepage: http://diy-cms.com)\n\n\nAbstract:\n=========\nA Vulnerability Laboratory researcher discovered multiple web vulnerabilities in DIY v1.0 Content Management System.\n\n\nReport-Timeline:\n================\n2012-04-16:     Public or Non-Public Disclosure\n\n\nStatus:\n========\nPublished\n\n\nExploitation-Technique:\n=======================\nRemote\n\n\nSeverity:\n=========\nHigh\n\n\nDetails:\n========\n1.1\nA SQL Injection vulnerability  is detected in DIY v1.0 Content Management System.\nThe vulnerability allows an attacker (remote) or local low privileged user account to inject/execute own sql commands\non the affected application dbms. Successful exploitation of the vulnerability results in dbms & application compromise.\n\nVulnerable Module(s):\n                                           [+] Mod - Poll\n\n1.2\nMultiple non persistent cross site scripting vulnerability is detected  in DIY v1.0 Content Management System.\nThe vulnerability allows remote attackers to hijack website customer, moderator or admin sessions with high required\nuser inter action or local low privileged user account. Successful exploitation can result in account steal, phishing\n& client-side content request manipulation.\n\nVulnerable Module(s):\n                                           [+] Poll - Question & Answer Input/Output\n\n\n1.3\nA cross site request forgery vulnerability is detected  in DIY v1.0 Content Management System. The bugs allow remote\nattackers with high required user inter action to edit user accounts. Successful exploitation can lead to account\naccess.\nTo exploit the issue the attacker need to create a manipulated copy the edit user mask/form. Inside of the document the\nremote can implement his own values for the update because of no form or token protection. When admin get now forced to\nexecute the script via link he is executing the new value on the update of the application if his session is not\nexpired.\n\nVulnerable Module(s):\n                                           [+] &modfile=add\n\n\nProof of Concept:\n=================\n1.1\nThe sql injection vulnerabilities can be exploited by remote attackers without user inter action.\nExploitation requires the possibility to allow an attacker to add or config a poll.\nFor demonstration or reproduce ...\n\nPoC:\ndiy-cms/mod.php?mod=poll&start=`[SQL-INJECTION]--\n\n\n1.2\nThe cross site vulnerabilities can be exploited by remote attackers with medium required user inter action.\nFor demonstration or reproduce ...\n\nPoC:\ndiy-cms/modules/poll/add.php[Cross Site Scripting]\n\n\n1.3\nThe cross site request forgery vulnerabilities can be exploited by remote attackers with high required user inter\naction.\nFor demonstration or reproduce ...\n\n<form action=\"http://127.0.0.1/diy/mod.php?mod=poll&modfile=add\"; method=\"post\" name=\"add_poll\"\nenctype=\"multipart/form-data\">\n<input type=\"hidden\" name='polltype' value='1'>\n\n<input type=\"hidden\" name=\"question\" value=\"<script>alert(1)</script>\">\n<input type=\"hidden\" name=\"answer1\" value=\"<script>alert(1)</script>\">\n<input type=\"hidden\" name=\"answer2\" value=\"<script>alert(1)</script>\">\n\n<input type=\"hidden\" name='active' value='1' checked>\n<input type=submit name='submit' value=XSS></td>\n</form>\n\n\nSolution:\n=========\n1.1\n\nIn file /diy-cms/modules/poll/index.php\nline: 50 - 55\n\n$ppp = $mod->setting(/`polls_per_page/`);\n                if(!isset($_GET[/`start/`]))\n                {$start = /`0/`;\n                }else{\n                $start = $_GET[/`start/`];\n                }\n\nwe edit to:\n\n$ppp = $mod->setting(/`polls_per_page/`);\n                if(!isset($_GET[/`start/`]))\n                {$start = /`0/`;\n                }else{\n                $start = (int)$_GET[/`start/`];\n                }\n\n\n\n1.2\n\nIn file /diy-cms/modules/poll/add.php\nline: 53 - 84\n\n         if($submit)\n        {\n           extract($_POST);\n           $type  = $_POST[/``polltype/``];\n           $question = $_POST[/``question/``];\n           $status = $_POST[/``active/``];\n           $date = time();\n\n           $arr_post_vars = array($type,  $question);\n\n           if (!required_entries($arr_post_vars))\n           {\n               error_message($lang[/`LANG_ERROR_VALIDATE/`]);\n           }\n\n           if($status == /`1/`)\n           {\n              $result = $diy_db->query(/``update diy_poll_questions set status=/`0/`/``);\n          }\n\n          $result = $diy_db->query(/``INSERT INTO diy_poll_questions VALUES\n(/`/`,/`$question/`,/`$type/`,/`$status/`,/`$date/`)/``);\n          $qid = $diy_db->insertid();\n\nwe edit to:\n\n         if($submit)\n         {\n         extract($_POST);\n         $type  = $_POST[/``polltype/``];\n         $question = $_POST[/``question/``];\n         $status = $_POST[/``active/``];\n         $date = time();\n\n         $arr_post_vars = array($type, $question);\n\n         if (!required_entries($arr_post_vars))\n         {\n             error_message($lang[/`LANG_ERROR_VALIDATE/`]);\n         }\n\n         if($status == /`1/`)\n         {\n             $result = $diy_db->query(/``update diy_poll_questions set status=/`0/`/``);\n         }\n         $question = htmlspecialchars(strip_tags($question));\n         $result = $diy_db->query(/``INSERT INTO diy_poll_questions VALUES\n(/`/`,/`$question/`,/`$type/`,/`$status/`,/`$date/`)/``);\n         $qid = $diy_db->insertid();\n\nIn file /diy-cms/modules/poll/edit.php\nline: 69 - 76\n\n         $result = $diy_db->query(/``update diy_poll_questions set question=/`$question/`, type=/`$type/`,\nstatus=/`$status/` where qid=/`$qid/`/``);\n\n         foreach ($_POST[/`answer/`] as $answer)\n         {\n                $answer = $answer;\n                if (!empty($answer)) {\n                $diy_db->query(/``update diy_poll_answers set answer=/`$answer/` where aid=/`$aid/` /``);\n         }\n\nwe edit to:\n\n         $question = htmlspecialchars(strip_tags($question));\n         $result = $diy_db->query(/``update diy_poll_questions set question=/`$question/`, type=/`$type/`,\nstatus=/`$status/` where qid=/`$qid/`/``);\n\n         foreach ($_POST[/`answer/`] as $answer)\n         {\n                $answer = htmlspecialchars(strip_tags($answer));\n                if (!empty($answer)) {\n                $diy_db->query(/``update diy_poll_answers set answer=/`$answer/` where aid=/`$aid/` ``);\n         }\n\n\nRisk:\n=====\n1.1\nThe security risk of the sql injection vulnerabilities are estimated as high(+).\n\n1.2\nThe security risk of the persistent input validation vulnerability is estimated as medium(-).\n\n1.2\nThe security risk of the persistent input validation vulnerability is estimated as low(+).\n\n\nCredits:\n========\nVulnerability Laboratory [Research Team]  -    snup (snup () vulnerability-lab com)\n\n\nDisclaimer:\n===========\nThe information provided in this advisory is provided as it is without any warranty. Vulnerability-Lab disclaims all\nwarranties,\neither expressed or implied, including the warranties of merchantability and capability for a particular purpose.\nVulnerability-\nLab or its suppliers are not liable in any case of damage, including direct, indirect, incidental, consequential loss\nof business\nprofits or special damages, even if Vulnerability-Lab or its suppliers have been advised of the possibility of such\ndamages. Some\nstates do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing\nlimitation\nmay not apply. Any modified copy or reproduction, including partially usages, of this file requires authorization from\nVulnerability-\nLab. Permission to electronically redistribute this alert in its unmodified form is granted. All other rights,\nincluding the use of\nother media, are reserved by Vulnerability-Lab or its suppliers.\n\n                                                Copyright © 2012 Vulnerability-Lab\n\n\n\n\n--\nVULNERABILITY RESEARCH LABORATORY TEAM\nWebsite: www.vulnerability-lab.com\nMail: research () vulnerability-lab com","sha256":"bb60a701bdba2082e34d343af7db8c4a25b885365f54b078895c762ea1d5ff52","bytes":8430,"fetchedAt":"2026-11-26T19:06:09.173Z","encoding":"utf-8 (display only; download retains original bytes)"}