SV-235168r638812_rule
V-235168
SRG-APP-000378-DB-000365
MYS8-00-009100
CAT II
10
MySQL requires users (other than root) to be explicitly granted the CREATE ROUTINE privilege in order to install logical modules.
Check user grants using the SHOW GRANTS and look for appropriate assignment of CREATE ROUTINE.
For example - REVOKE CREATE ROUTINE ON mydb.* TO 'someuser'@'somehost';
MySQL requires users (other than root) to be explicitly granted the CREATE ROUTINE privilege in order to install logical modules.
To obtain a listing of users and roles who are authorized to create, alter, or replace stored procedures and functions from the server documentation.
Execute the following query:
For server level permissions
SELECT `user`.`Host`,
`user`.`User`
FROM `mysql`.`user`
where `Create_routine_priv`='Y' OR
`Alter_routine_priv` = 'Y';
If any users or role permissions returned are not authorized to modify the specified object or type, this is a finding.
If any user or role membership is not authorized, this is a finding.
For database schema level permission (db is the schema name)
SELECT `db`.`Host`,
`db`.`User`,
`db`.`Db`
FROM `mysql`.`db` where `db`.`Create_routine_priv`='Y' OR
`db`.`Alter_routine_priv` = 'Y';
If any users or role permissions returned are not authorized to modify the specified object or type, this is a finding.
If any user or role membership is not authorized, this is a finding.
V-235168
False
MYS8-00-009100
MySQL requires users (other than root) to be explicitly granted the CREATE ROUTINE privilege in order to install logical modules.
To obtain a listing of users and roles who are authorized to create, alter, or replace stored procedures and functions from the server documentation.
Execute the following query:
For server level permissions
SELECT `user`.`Host`,
`user`.`User`
FROM `mysql`.`user`
where `Create_routine_priv`='Y' OR
`Alter_routine_priv` = 'Y';
If any users or role permissions returned are not authorized to modify the specified object or type, this is a finding.
If any user or role membership is not authorized, this is a finding.
For database schema level permission (db is the schema name)
SELECT `db`.`Host`,
`db`.`User`,
`db`.`Db`
FROM `mysql`.`db` where `db`.`Create_routine_priv`='Y' OR
`db`.`Alter_routine_priv` = 'Y';
If any users or role permissions returned are not authorized to modify the specified object or type, this is a finding.
If any user or role membership is not authorized, this is a finding.
M
5277