phpMyAdmin security vulnerability

fln

Administrator
Staff member
Joined
Aug 30, 2021
Messages
1,515
With the latest DA release, a security vulnerability for phpMyAdmin installation was fixed. More details are recently added to the change log.

The issue is fixed in all active release channels (alpha, current, stable) and additionally in the rhel7 and debian10 EOL release channels. If DA auto-updates were not disabled, there are no additional actions needed to secure the server.

The file examples/signon.php is just a simple login-form, but it allows specifying the database server address. We received a report that on one server the ability to connect to an arbitrary MySQL server was converted to an exploit that gets file read access for the webapps user. Since webapps is used for Roundcube, file read access for webapps can be used to read Roundcube session data and extract IMAP credentials.

The PHP configuration with mysqli.allow_local_infile = Off is not enough because phpMyAdmin explicitly enables it, when user is visiting import page. The phpMyAdmin attempted to fix it with PMASA-2019-1 but latest phpMyAdmin versions are still vulnerable with no server side option to disable it.

Please check if the servers you manage show any signs of this vulnerability being exploited:

Code:
grep 'POST.*/examples/signon.php.* 302 ' /var/log/*/domains/*.log /var/log/*/access_log*

If you spot any suspicious activity, please rotate the Roundcube database credentials and encryption key with the following commands:

Code:
rm /var/www/tmp/sess*
sed -i -e '/db_dsnw/d;/des_key/d' /var/www/html/roundcube/../config/config.inc.php  # remove DB credentials and encryption key to force CustomBuild to generate new ones
da build roundcube                                                                  # reinstall roundcube, to generate new config
mysql --defaults-extra-file=<(da my-cnf) -e "DELETE FROM da_roundcube.session"      # remove old roundcube sessions, that used the old encryption key

And rotate email account passwords.
 
Were servers with phpmyadmin_public no also vulnerable?
Yes, the script in examples directory is like an additional login page that was accessible even if we block the access from main login page.
 
Back
Top