CVE-2003-0150: Critical severity ORACLE MySQL vulnerability
MySQL 3.23.55 and earlier creates world-writeable files and allows mysql users to gain root privileges by using the "SELECT INFO OUTFILE" operator to overwrite a configuration file and cause mysql to run as root upon restart, as demonstrated by modifying my.cnf.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Ensure the MySQL configuration file (my.cnf) is not world-writable and is owned by root. Example: chown root:root /path/to/my.cnf; chmod 644 /path/to/my.cnf (remove 'others' write permission).
my.cnf (MySQL configuration file) file_permissions = remove world-writable (no 'others' write); owned by root - Configuration
Remove the FILE privilege from any database accounts that do not explicitly require it to prevent writing files via SELECT ... INTO OUTFILE. Example: REVOKE FILE ON *.* FROM 'username'@'host'; FLUSH PRIVILEGES;
MySQL server FILE privilege = revoke from non-administrative accounts - Compensating control
Restrict who can modify MySQL configuration and restart the server. Limit access to service management (for example, systemctl/service control) and to directories containing MySQL config/data so unprivileged mysql users cannot overwrite configuration and trigger a restart that runs the server as root.
- Operational
Audit my.cnf and other MySQL configuration files for unauthorized modifications, compare to known-good backups, and restore any altered files. If unauthorized changes are found, perform a host compromise investigation and remediate (contain, eradicate) before allowing service restart.
Event History
Frequently Asked Questions
What is the severity of CVE-2003-0150?
CVE-2003-0150 is considered a critical vulnerability due to its potential to allow unprivileged MySQL users to gain root privileges.
How do I fix CVE-2003-0150?
To fix CVE-2003-0150, upgrade your MySQL installation to version 3.23.56 or later, which addresses this vulnerability.
What are the affected versions for CVE-2003-0150?
CVE-2003-0150 affects MySQL versions 3.23.55 and earlier.
How does CVE-2003-0150 exploit the system?
CVE-2003-0150 allows attackers to use the 'SELECT * INFO OUTFILE' operator to overwrite MySQL's configuration file, enabling execution as root.
Can CVE-2003-0150 be mitigated without an upgrade?
Mitigating CVE-2003-0150 without an upgrade may involve altering file permissions to prevent world-writable files, but complete resolution requires upgrading.