WordPress wp-db.php文件字符集SQL注入漏洞

漏洞信息详情

WordPress wp-db.php文件字符集SQL注入漏洞

漏洞简介

WordPress是一款免费的论坛Blog系统。

WordPress处理用户数据时存在漏洞,远程攻击者可能利用此漏洞执行SQL注入攻击。

WordPress中的大多数数据库查询使用escape()方式过滤SQL字符串,实际上是通过addslashes()函数过滤输入,而addslashes()函数没有考虑SQL字符串中所使用的字符集,盲目的向单引号前插入反斜线,这样的反斜线可能会形成其他有效的字符。以下是wp-includes/query.php中的漏洞代码:

// If a search pattern is specified, load the posts that match

if ( !empty($q[\’\’s\’\’]) ) {

……

foreach((array)$q[\’\’search_terms\’\’] as $term) {

$term = addslashes_gpc($term);

……

}

addslashes_gpc()是在wp-includes/formatting.php中定义的:

function addslashes_gpc($gpc) {

……

return $wpdb->escape($gpc);

}

escape()方式属于wp-includes/wp-db.php:

function escape($string) {

return addslashes( $string ); // Disable rest for now, causing problems

……

}

当WordPress试图查询使用了特定字符集的MySQL数据库时,就会导致基于字符集的SQL注入攻击。目前已知的可利用字符集包括Big5和GBK等。

漏洞公告

目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://wordpress.org/

参考网址

来源: XF

名称: wordpress-gbk-big5-sql-injection(38959)

链接:http://xforce.iss.net/xforce/xfdb/38959

来源: BID

名称: 26795

链接:http://www.securityfocus.com/bid/26795

来源: BUGTRAQ

名称: 20071210 WordPress Charset SQL injection vulnerability (re-resend)

链接:http://www.securityfocus.com/archive/1/archive/1/484828/100/0/threaded

来源: VUPEN

名称: ADV-2007-4172

链接:http://www.frsirt.com/english/advisories/2007/4172

来源: MISC

链接:http://www.abelcheung.org/advisory/20071210-wordpress-charset.txt

来源: SECUNIA

名称: 28005

链接:http://secunia.com/advisories/28005

来源: FEDORA

名称: FEDORA-2008-0126

链接:https://www.redhat.com/archives/fedora-package-announce/2008-January/msg00098.html

来源: FEDORA

名称: FEDORA-2008-0103

链接:https://www.redhat.com/archives/fedora-package-announce/2008-January/msg00079.html

来源: SECTRACK

名称: 1019071

链接:http://www.securitytracker.com/id?1019071

来源: SREASON

名称: 3433

链接:http://securityreason.com/securityalert/3433

来源: SECUNIA

名称: 28310

链接:http://secunia.com/advisories/28310

来源: FULLDISC

名称: 20071210 WordPress Charset SQL injection vulnerability (re-resend)

链接:http://lists.grok.org.uk/pipermail/full-disclosure/2007-December/058999.html

来源:NSFOCUS
名称:11261
链接:http://www.nsfocus.net/vulndb/11261

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享