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

    • Can result in unexpected behaviour

    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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.