PMASA-2019-1

Announcement-ID: PMASA-2019-1

Date: 2019-01-21

Summary

Arbitrary file read vulnerability

Description

When AllowArbitraryServer configuration set to true, with the use of a rogue MySQL server, an attacker can read any file on the server that the web server's user can access.

phpMyadmin attempts to block the use of LOAD DATA INFILE, but due to a bug in PHP, this check is not honored. Additionally, when using the 'mysql' extension, mysql.allow_local_infile is enabled by default. Both of these conditions allow the attack to occur.

Severity

We consider this vulnerability to be critical.

Mitigation factor

This attack can be mitigated by setting the `AllowArbitraryServer` configuration directive to false (which is the default value).

Affected Versions

phpMyAdmin versions from at least 4.0 through 4.8.4 are affected

Solution

Upgrade to phpMyAdmin 4.8.5 or newer or apply patch listed below.

References

Thanks to Tongqing Zhu@Knownsec 404 Team (https://www.knownsec.com), Hongkun Zeng, chromium1337 (https://hackerone.com/chromium1337) and Hanno Böck (https://hboeck.de) for reporting this vulnerability and Jakub Vrána for his patch.

Assigned CVE ids: 2019-6799

CWE ids: CWE-661

Patches

The following commits have been made on the 4.8 branch to fix this issue:

More information

For further information and in case of questions, please contact the phpMyAdmin team. Our website is phpmyadmin.net.

Announcements