Date: 5 Jan 2005 15:24:27 +0200
From: SecuriTeam <support@securiteam.com.>
To: [email protected]Subject: [UNIX] PHPKIT userinfo.php SQL Injection
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
PHPKIT userinfo.php SQL Injection
------------------------------------------------------------------------
SUMMARY
<http://www.phpkit.de/> PHPKIT is "a modular developed homepage software
which enables simple management messages contents, guest book, forums and
more".
Due to improper sanity validation checks in PHPKIT's login/userinfo.php it
is possible for an attacker to manipulate an SQL query.
DETAILS
Vulnerable Systems:
* PHPKIT version 1.6.1 and prior
Vulnerable code:
In the file login/userinfo.php, the following line can be found:
$userinfo=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['user']."
where user_id='".$id."' LIMIT 1"));
This SQL statement's $id parameter is not filtered properly.
Examples:
http://127.0.0.1/phpkit/include.php?path=login/userinfo.php&id=1' and
1=2/*
http://127.0.0.1/phpkit/include.php?path=login/userinfo.php&id=1' user_pw
like char(37)/*
Unofficial Patch:
Change
$userinfo=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['user']."
where user_id='".$id."' LIMIT 1"));
to
$userinfo=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['user']."
where user_id='".addslahes($id)."' LIMIT 1"));
ADDITIONAL INFORMATION
The information has been provided by <mailto:sh4d0w@mail.ru.> sh4d0w.
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: [email protected]
In order to subscribe to the mailing list, simply forward this email to: [email protected]
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.