Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-37951

SHOW TABLES allows users with only GRANT OPTION privilege to read all table names in the database "mysql"

    XMLWordPrintable

Details

    • Notable changes

    Description

      A security vulnerability exists where a user with only the GRANT OPTION privilege can improperly read all table names in the database "mysql". The issue does not occur in standard MySQL, where the expected access denial is correctly enforced.
      How to reproduce:

      -- Login as ROOT user
      CREATE USER regular;
      GRANT GRANT OPTION ON *.* TO regular;
       
      -- Login as regular user
      SHOW TABLES FROM mysql;
      /* Expected Behavior: ERROR 1044 (42000): Access denied for user 'regular'@'%' to database 'mysql'
      Actual Behavior:
      +---------------------------+
      | Tables_in_mysql           |
      +---------------------------+
      | column_stats              |
      | columns_priv              |
      ...
      | user                      |
      +---------------------------+
      */
       
      -- Note: running the same commands in MySQL will get correct behavior:
      -- ERROR 1044 (42000): Access denied for user 'regular'@'%' to database 'mysql'
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            ApplePie Peng Zongrui
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: