Step 1: User Account Creation: An administrator adds a new user to the MySQL database, including a username and password.
Step 2: Log File Generation: The mysqld process logs information about the user creation, including the password (or a hash) to a log file.
Step 3: Permission Flaw: The mysqld process creates the log file with world-readable permissions (e.g., chmod 644).
Step 4: Local User Access: A local attacker gains access to the system, either through existing credentials or another vulnerability.
Step 5: Log File Reading: The attacker reads the world-readable log file.
Step 6: Password Extraction: The attacker extracts the user's password (or cracks the hash) from the log file.
Step 7: Database Compromise: The attacker uses the extracted credentials to log into the MySQL database and gain unauthorized access.