Cross-site request forgery in phpMyAdmin - CVE-2019-12616

 

Cross-site request forgery in phpMyAdmin - CVE-2019-12616

Published: June 5, 2019 / Updated: June 17, 2021


Vulnerability identifier: #VU18679
CSH Severity: Medium
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2019-12616
CWE-ID: CWE-352
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote attacker to perform cross-site request forgery attacks.

The vulnerability exists due to insufficient validation of the HTTP request origin in "tbl_sql.php" script. A remote attacker can trick the victim to visit a specially crafted web page and perform arbitrary actions on behalf of the victim on the vulnerable website, such as execute arbitrary INSERT or DELETE statements.

PoC:

http://[host]/tbl_sql.php?sql_query=INSERT+INTO+%60pma__bookmark%60+(%60id%60%2C+%60dbase%60%2C+%60user%60%2C+%60label%60%2C+%60query%60)+VALUES+(DAYOFWEEK(%27%27)%2C+%27%27%2C+%27%27%2C+%27%27%2C+%27%27)&show_query=1&db=phpmyadmin&table=pma__bookmark

Affected software

phpMyAdmin
phpmyadmin (Alpine package)
php-phpmyadmin-sql-parser
phpmyadmin (Ubuntu package)
phpMyAdmin
SUSE Package Hub for SUSE Linux Enterprise
SUSE Linux
Opensuse
Ubuntu
Fedora

How to mitigate CVE-2019-12616

Install update from vendor's website.

phpMyAdmin - update to 4.9.0
phpmyadmin (Alpine package) - addressed in versions 4.9.0.1-r0, 4.9.1-r0
php-phpmyadmin-sql-parser - addressed in versions 4.3.2-1.fc29, 4.3.2-1.fc30
phpmyadmin (Ubuntu package) - update to 4:4.6.6-5ubuntu0.5
phpMyAdmin - addressed in versions 4.9.0.1-1.fc29, 4.9.0.1-1.fc30

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins