TMA-MYSQL-5.9
Ensure DML/DDL Grants are Limited to Specific Databases and Users
Description
DML/DDL includes the set of privileges used to modify or create data structures. This includes INSERT, SELECT, UPDATE, DELETE, DROP, CREATE, and ALTER privileges.
How it is checked
Audit method: Manual review
This recommendation cannot be checked automatically. A scan lists it with these instructions when you pass --include-manual.
Run SELECT User, Host, Db FROM mysql.db WHERE Select_priv='Y' OR Insert_priv='Y' OR Update_priv='Y' OR Delete_priv='Y' OR Create_priv='Y' OR Drop_priv='Y' OR Alter_priv='Y'; and ensure every returned user is permitted these privileges on the indicated database.
How it is fixed
Fix method: Guidance or infrastructure patch
REVOKE SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER ON <db>.* FROM '<user>'@'<host>'; for each unauthorized grant.
Properties
- Operating systems
- Any
- Tags
- mysqldatabaseauthorizationmanual
- Reference
- CIS Oracle MySQL Community Server 8.4 Benchmark v1.1.0 - 5.9 Ensure DML/DDL Grants are Limited to Specific Databases and Users