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

SHOW DATABASES allows users with only GRANT OPTION privilege to read all databases names

    XMLWordPrintable

Details

    Description

      CREATE USER 'g'@'%' IDENTIFIED BY 'g';
      GRANT GRANT OPTION ON *.* TO 'g'@'%'; 
      create database acme;
      CREATE TABLE acme.leak_test (id int, secret_data varchar(255));
       
      --connect (a1,127.0.0.1,g,g)
       
      --connection a1 
      SHOW GRANTS FOR CURRENT_USER;
      --error 1142
      SELECT * FROM acme.leak_test;
       
      SHOW DATABASES;
      SELECT schema_name FROM information_schema.schemata;
       
      --disconnect a1
      --connection default
      DROP USER 'g'@'%';
      DROP DATABASE acme;
      

      Reported by Anindya Sankar Roy

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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