Path traversal with SaveDir and UploadDir
A vulnerability was reported with the
%u username replacement functionality of the SaveDir and UploadDir features. When the username substitution is configured, a specially-crafted user name can be used to circumvent restrictions to traverse the file system.
We consider this vulnerability to be serious, however due to the mitigation factors the default state is not vulnerable.
1) A system must be configured with the %u username replacement, such as `$cfg['SaveDir'] = 'SaveDir_%u';` 2) The user must be able to create a specially-crafted MySQL user, including the `/.` sequence of characters, such as `/../../`
All 4.6.x versions (prior to 4.6.4), 4.4.x versions (prior to 22.214.171.124), and 4.0.x versions (prior to 126.96.36.199) are affected
Upgrade to phpMyAdmin 4.6.4, 188.8.131.52, or 184.108.40.206 or newer or apply patch listed below.
Thanks to Emanuel Bronshtein @e3amn2l for reporting this vulnerability.
Assigned CVE ids: CVE-2016-6614
CWE ids: CWE-661
The following commits have been made on the 4.0 branch to fix this issue:
The following commits have been made on the 4.4 branch to fix this issue:
The following commits have been made on the 4.6 branch to fix this issue:
For further information and in case of questions, please contact the phpMyAdmin team. Our website is phpmyadmin.net.