Description:
A SQL SECURITY DEFINER procedure can read information_schema.INNODB_FT_DEFAULT_STOPWORD when its definer has no global PROCESS privilege. The definer account has only USAGE and procedure-level EXECUTE.
The CALL succeeds and exposes all 36 rows under the low-privilege effective identity:
effective_user exposed_rows
u1@% 36
The query should fail because the effective account lacks global PROCESS.
How to repeat:
Run as root:
CREATE DATABASE db1;
CREATE USER 'u1'@'%';
DELIMITER $$
CREATE DEFINER='u1'@'%'
PROCEDURE db1.read_stopwords()
SQL SECURITY DEFINER
READS SQL DATA
BEGIN
SELECT CURRENT_USER() AS effective_user,
COUNT(*) AS exposed_rows
FROM information_schema.INNODB_FT_DEFAULT_STOPWORD;
END$$
DELIMITER ;
GRANT EXECUTE ON PROCEDURE db1.read_stopwords TO 'u1'@'%';
CALL db1.read_stopwords();
-- Observed:
-- effective_user exposed_rows
-- u1@% 36
-- Expected: access denied because u1@% lacks global PROCESS.
Suggested fix:
Enforce the global PROCESS privilege when filling INNODB_FT_DEFAULT_STOPWORD, consistently with other INNODB_* INFORMATION_SCHEMA providers.
Page generated in 0.037 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders. It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: A SQL SECURITY DEFINER procedure can read information_schema.INNODB_FT_DEFAULT_STOPWORD when its definer has no global PROCESS privilege. The definer account has only USAGE and procedure-level EXECUTE. The CALL succeeds and exposes all 36 rows under the low-privilege effective identity: effective_user exposed_rows u1@% 36 The query should fail because the effective account lacks global PROCESS. How to repeat: Run as root: CREATE DATABASE db1; CREATE USER 'u1'@'%'; DELIMITER $$ CREATE DEFINER='u1'@'%' PROCEDURE db1.read_stopwords() SQL SECURITY DEFINER READS SQL DATA BEGIN SELECT CURRENT_USER() AS effective_user, COUNT(*) AS exposed_rows FROM information_schema.INNODB_FT_DEFAULT_STOPWORD; END$$ DELIMITER ; GRANT EXECUTE ON PROCEDURE db1.read_stopwords TO 'u1'@'%'; CALL db1.read_stopwords(); -- Observed: -- effective_user exposed_rows -- u1@% 36 -- Expected: access denied because u1@% lacks global PROCESS. Suggested fix: Enforce the global PROCESS privilege when filling INNODB_FT_DEFAULT_STOPWORD, consistently with other INNODB_* INFORMATION_SCHEMA providers.