发布时间 :2000-01-11 00:00:00
修订时间 :2008-09-10 15:02:25

[原文]MySQL allows local users to modify passwords for arbitrary MySQL users via the GRANT privilege.

[CNNVD]MySQL GRANT全局密码改变漏洞(CNNVD-200001-029)


- CVSS (基础分值)

CVSS分值: 6.4 [中等(MEDIUM)]
机密性影响: PARTIAL [很可能造成信息泄露]
完整性影响: PARTIAL [可能会导致系统文件被修改]
可用性影响: NONE [对系统可用性无影响]
攻击复杂度: LOW [漏洞利用没有访问限制 ]
攻击向量: [--]
身份认证: NONE [漏洞利用无需身份认证]

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

cpe:/a:mysql:mysql:3.23.8MySQL MySQL 3.23.8
cpe:/a:mysql:mysql:3.22.27MySQL MySQL 3.22.27
cpe:/a:mysql:mysql:3.22.29MySQL MySQL 3.22.29

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


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

- 其它链接及资源

- 漏洞信息

MySQL GRANT全局密码改变漏洞
中危 访问验证错误
2000-01-11 00:00:00 2006-09-21 00:00:00

- 公告与补丁

        MySQL 3.22.30 has been released and is not vulnerable to this problem.
        Sasha Pachev sent us the following patch on January 12, 1999:
        *** /my/monty/master/mysql-3.23.8-alpha/sql/ Fri Dec 31 13:53:03 1999
        --- ./ Mon Jan 10 21:53:59 2000
        *** 1222,1227 ****
        --- 1222,1246 ----
         tables ? &tables->grant.privilege : 0,
         tables ? 0 : 1))
         goto error;
        + /* Check that the user isn't trying to change a password for another
        + user if he doesn't have UPDATE privilege to the MySQL database
        + List_iterator user_list(lex->users_list);
        + LEX_USER *user;
        + while ((user=user_list++))
        + {
        + if (user->password.str &&
        + (strcmp(thd->user,user->user.str) ||
        + user->host.str && my_strcasecmp(user->host.str,
        + thd->host ? thd->host : thd->ip)))
        + {
        + if (check_access(thd, UPDATE_ACL, "mysql",0,1))
        + goto error;
        + break; // We are allowed to do changes
        + }
        + }
         if (tables)
         if (grant_option && check_grant(thd,

- 漏洞信息 (19721)

MySQL 3.22.27/3.22.29/3.23.8 GRANT Global Password Changing Vulnerability (EDBID:19721)
multiple local
2000-02-15 Verified
0 Viktor Fougstedt
N/A [点击下载]

MySQL is a popular RDBMS used by many websites as a back-end. It is possible for users with GRANT access to change passwords for every user in the database (including the mysql superuser). MySQL also ships with a default "test" account which has GRANT privileges and is unpassworded, meaning anyone can connect to the db. These two problems combined can result in a total, remote (and probably anonymous) database compromise. The database can be compromised even if the test account is disabled (given a local user account with GRANT privs).

Exploit: Connect to mysql as any user with grant privileges for any table. The default test users will do nicely. If no databases has been created for the test user, do so. Then alter roots (MySQL's roots, not the real roots!) password with a GRANT. After the code below has been executed, the password of the MySQL superuser 'root' will be 'newpassword'.

> mysql -utest -p

mysql> CREATE DATABASE test_expl;
Query OK, 1 row affected (0.04 sec)

mysql> GRANT select ON test_expl.* TO root@localhost IDENTIFIED BY
Query OK, 0 rows affected (0.01 sec)

mysql> exit

- 漏洞信息

MySQL GRANT Privilege Arbitrary Password Modification
Local / Remote Misconfiguration
Loss of Integrity
Exploit Public

- 漏洞描述

- 时间线

2000-01-11 Unknow
2000-01-11 Unknow

- 解决方案

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

- 相关参考

- 漏洞作者

Unknown or Incomplete