| View previous topic :: View next topic |
| Author |
Message |
Evaders99

Joined: Jan 11, 2002 Posts: 3079 Location: USA
|
Posted: Tue Mar 13, 2007 12:04 am Post subject: Security: PHP-Nuke HTTP "referer" SQL Injection Vu |
|
|
In response to:
http://secunia.com/advisories/24224/
I am posting an analysis here:
All Patched files may be vulnerable. RavenNuke may be vulnerable.
In index.php
Patched
| Code: |
$result = $db->sql_query("INSERT INTO ".$prefix."_referer VALUES (NULL, '".$referer."')");
TO
$result = $db->sql_query("INSERT INTO ".$prefix."_referer VALUES (NULL, '".addslashes($referer)."')");
|
RavenNuke
| Code: |
$result = $db->sql_query('INSERT INTO '.$prefix.'_referer VALUES (NULL, \''.$referer.'\')');
TO
$result = $db->sql_query('INSERT INTO '.$prefix.'_referer VALUES (NULL, \''.addslashes($referer).'\')');
|
_________________ Evaders99
Webmaster
Administrator
Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
The cake is a lie. |
|
| Back to top |
|
 |
Evaders99

Joined: Jan 11, 2002 Posts: 3079 Location: USA
|
|
| Back to top |
|
 |
ryanrbftp Newbie


Joined: Oct 09, 2009 Posts: 1
|
Posted: Thu Oct 08, 2009 11:41 pm Post subject: |
|
|
| Does this exist for older version of PHP-Nuke? |
|
| Back to top |
|
 |
Evaders99

Joined: Jan 11, 2002 Posts: 3079 Location: USA
|
Posted: Fri Oct 09, 2009 12:54 am Post subject: |
|
|
Most certainly yes. _________________ Evaders99
Webmaster
Administrator
Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
The cake is a lie. |
|
| Back to top |
|
 |
stevenswing Newbie


Joined: Oct 09, 2009 Posts: 5
|
Posted: Sat Oct 10, 2009 10:11 am Post subject: |
|
|
Just patched our code for this, would this work:
| Code: |
| $sql = "INSERT INTO ".$prefix."_referer VALUES (NULL, '".addslashes($referer)."')"; |
 |
|
| Back to top |
|
 |
Evaders99

Joined: Jan 11, 2002 Posts: 3079 Location: USA
|
Posted: Sat Oct 10, 2009 6:58 pm Post subject: |
|
|
Looks fine _________________ Evaders99
Webmaster
Administrator
Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
The cake is a lie. |
|
| Back to top |
|
 |
|