1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
Title: ====== GENU CMS 2012.3 - Multiple SQL Injection Vulnerabilities Date: ===== 2012-04-30 References: =========== http://www.vulnerability-lab.com/get_content.php?id=538 VL-ID: ===== 538 Introduction: ============= GENU is a Content Management System written with PHP language and using a database server (MySQL, PostgreSQL or SQLite) for storage. It is fully customisable since it uses a templates system and supports multiple languages. (Copy of the Vendor Homepage: http://www.gnew.fr) Abstract: ========= A Vulnerability Laboratory Research Team discovered multiple SQL Injection vulnerabilities in GENU CMS 2012.3 content management system. Report-Timeline: ================ 2012-04-28: Vendor Fix/Patch by Check 2012-04-30: Public or Non-Public Disclosure Status: ======== Published Exploitation-Technique: ======================= Remote Severity: ========= Critical Details: ======== A SQL Injection vulnerabilityis detected in GENU CMS 2012.3. The vulnerability allows an attacker (remote) or local low privileged user account to inject/execute own sql commands on the affected application dbms. Successful exploitation of the vulnerability results in dbms & application compromise. Vulnerable Module(s): [+] posts/search.php [+] news/search.php [+] comments/search.php Proof of Concept: ================= The sql injection vulnerabilities can be exploited by remote attackers without user inter action. For demonstration or reproduce ... Word in 'search' must consist of at least two characters PoC: http://127.0.0.1:8080/GENU/news/search.php?search=xd&match=<code>news_subject[SQL-Injection] http://127.0.0.1:8080/GENU/comments/search.php?search=xd&match=</code>news_subject[SQL-Injection] http://127.0.0.1:8080/GENU/posts/search.php?search=xd&match=<code>news_subject[SQL-Injection] Solution: ========= In file: /news/search.php In line 82: AND LOWER(</code> . TABLE_NEWS . <code>.</code> . $_GET[<code>match</code>] . <code>) LIKE\</code>%<code> . strtolower($search) . </code>% <code> In file: /comments/search.php In line 77: AND LOWER(</code> . TABLE_COMMENTS . <code>.</code> . $_GET[<code>match</code>] . <code>) LIKE</code>%<code> . strtolower($search) . </code>% <code> In file: /posts/search.php In line 78: AND LOWER(</code> . TABLE_POSTS . <code>.</code> . $_GET[<code>match</code>] . <code>) LIKE</code>%<code> . strtolower($search) . </code>% <code> Variable $_GET[</code>match<code>] is not filtered. We must in this line</code>s edit $_GET[<code>match</code>] on $match and add code: In file: /news/search.php In line 71 In file: /comments/search.php In line 69 In file: /posts/search.php In line 69 e.g code: if(isset($_GET[<code>match</code>])) { if ($_GET[<code>match</code>] == <code>news_subject</code>) $match = <code>news_subject</code>; if ($_GET[<code>match</code>] == <code>news_text</code>) $match = <code>news_text</code>; else $match = <code>news_subject</code>; } Risk: ===== The security risk of the sql injection vulnerabilities are estimated as high(+). Credits: ======== Vulnerability Laboratory [Research Team]-snup (snup@vulnerability-lab.com) |