mysql_install_db in MySQL 4.1.x before 4.1.12 and 5.x up to 5.0.4 creates the mysql_install_db.X file with a predictable filename and insecure permissions, which allows local users to execute arbitrary SQL commands by modifying the file's contents.
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A9504
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=158688
http://www.zataz.net/adviso/mysql-05172005.txt
http://www.securityfocus.com/bid/13660
http://www.redhat.com/support/errata/RHSA-2005-685.html
http://www.mandriva.com/security/advisories?name=MDKSA-2006:045
http://secunia.com/advisories/17080