phpMyAdmin: Insecure SQL script installation

Security Team  Contact Address

Updated April 30, 2005

1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200504-30 / phpmyadmin
Release Date April 30, 2005
Latest Revision May 22, 2006: 02
Impact normal
Exploitable local
Package Vulnerable versions Unaffected versions Architecture(s)
dev-db/phpmyadmin < 2.6.2-r1 >= 2.6.2-r1 All supported architectures

Related bugreports: #88831

Synopsis

phpMyAdmin leaves the SQL install script with insecure permissions, potentially leading to a database compromise.

2.  Impact Information

Background

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL databases from a web-browser. phpMyAdmin uses a pma MySQL user to control the linked-tables infrastructure. The SQL install script sets the initial password for the pma user.

Description

The phpMyAdmin installation process leaves the SQL install script with insecure permissions.

Impact

A local attacker could exploit this vulnerability to obtain the initial phpMyAdmin password and from there obtain information about databases accessible by phpMyAdmin.

3.  Resolution Information

Workaround

Change the password for the phpMyAdmin MySQL user (pma):

Code Listing 3.1: Workaround

mysql -u root -p
SET PASSWORD FOR 'pma'@'localhost' = PASSWORD('MyNewPassword');

Update your phpMyAdmin config.inc.php:

Code Listing 3.2: Workaround

$cfg['Servers'][$i]['controlpass']   = 'MyNewPassword';

Resolution

All phpMyAdmin users should change password for the pma user as described above and upgrade to the latest version:

Code Listing 3.3: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-db/phpmyadmin-2.6.2-r1"

4.  References