ID CVE-2016-5734
Summary phpMyAdmin 4.0.x before 4.0.10.16, 4.4.x before 4.4.15.7, and 4.6.x before 4.6.3 does not properly choose delimiters to prevent use of the preg_replace e (aka eval) modifier, which might allow remote attackers to execute arbitrary PHP code via a crafted string, as demonstrated by the table search-and-replace implementation.
References
Vulnerable Configurations
  • phpMyAdmin 4.0.10.15
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.15
  • phpMYAdmin 4.0.9
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.9
  • phpMYAdmin 4.0.8
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.8
  • phpMYAdmin 4.0.7
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.7
  • phpMYAdmin 4.0.6
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.6
  • phpMYAdmin 4.0.5
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.5
  • phpMYAdmin 4.0.4.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.4.2
  • phpMYAdmin 4.0.4.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.4.1
  • phpMYAdmin 4.0.4
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.4
  • phpMYAdmin 4.0.3
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.3
  • phpMYAdmin 4.0.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.2
  • phpMyAdmin 4.0.10.9
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.9
  • phpMyAdmin 4.0.10.8
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.8
  • phpMyAdmin 4.0.10.7
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.7
  • phpMyAdmin 4.0.10.6
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.6
  • phpMYAdmin 4.0.10.5
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.5
  • phpMyAdmin 4.0.10.4
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.4
  • phpMyAdmin 4.0.10.3
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.3
  • phpMYAdmin 4.0.10.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.2
  • phpMyAdmin 4.0.10.14
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.14
  • phpMyAdmin 4.0.10.13
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.13
  • phpMyAdmin 4.0.10.12
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.12
  • phpMyAdmin 4.0.10.11
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.11
  • phpMyAdmin 4.0.10.10
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.10
  • phpMyAdmin 4.0.10.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10.1
  • phpMYAdmin 4.0.10
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.10
  • phpMYAdmin 4.0.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.1
  • phpMYAdmin 4.0.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.0.0
  • phpMYAdmin 4.6.0 Rc2
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.6.0:rc2
  • phpMYAdmin 4.6.0 Rc1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.6.0:rc1
  • phpMYAdmin 4.6.0 Alpha1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.6.0:alpha1
  • phpMYAdmin 4.6.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.6.2
  • phpMYAdmin 4.6.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.6.1
  • phpMYAdmin 4.6.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.6.0
  • phpMyAdmin 4.4.15.6
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.15.6
  • phpMyAdmin 4.4.15.5
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.15.5
  • phpMyAdmin 4.4.9
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.9
  • phpMyAdmin 4.4.8
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.8
  • phpMyAdmin 4.4.7
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.7
  • phpMyAdmin 4.4.6.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.6.1
  • phpMyAdmin 4.4.6
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.6
  • phpMyAdmin 4.4.5
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.5
  • phpMyAdmin 4.4.4
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.4
  • phpMyAdmin 4.4.3
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.3
  • phpMYAdmin 4.4.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.2
  • phpMyAdmin 4.4.15.4
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.15.4
  • phpMyAdmin 4.4.15.3
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.15.3
  • phpMyAdmin 4.4.15.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.15.2
  • phpMyAdmin 4.4.15.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.15.1
  • phpMYAdmin 4.4.15
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.15
  • phpMYAdmin 4.4.14.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.14.1
  • phpMyAdmin 4.4.13.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.13.1
  • phpMyAdmin 4.4.13
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.13
  • phpMyAdmin 4.4.12
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.12
  • phpMyAdmin 4.4.11
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.11
  • phpMyAdmin 4.4.10
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.10
  • phpMyAdmin 4.4.1.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.1.1
  • phpMyAdmin 4.4.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.1
  • phpMyAdmin 4.4.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:4.4.0
CVSS
Base: 7.5 (as of 11-08-2016 - 16:32)
Impact:
Exploitability:
CWE CWE-94
CAPEC
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating User-Controlled Variables
    This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An attacker can override environment variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the attacker can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.
Access
VectorComplexityAuthentication
NETWORK LOW NONE
Impact
ConfidentialityIntegrityAvailability
PARTIAL PARTIAL PARTIAL
exploit-db via4
description PhpMyAdmin 4.6.2 - Post-Auth Remote Code Execution. CVE-2016-5734. Webapps exploit for PHP platform
file exploits/php/webapps/40185.py
id EDB-ID:40185
last seen 2016-07-30
modified 2016-07-29
platform php
port 80
published 2016-07-29
reporter @iamsecurity
title PhpMyAdmin 4.6.2 - Post-Auth Remote Code Execution
type webapps
metasploit via4
description phpMyAdmin 4.0.x before 4.0.10.16, 4.4.x before 4.4.15.7, and 4.6.x before 4.6.3 does not properly choose delimiters to prevent use of the preg_replace (aka eval) modifier, which might allow remote attackers to execute arbitrary PHP code via a crafted string, as demonstrated by the table search-and-replace implementation.
id MSF:EXPLOIT/MULTI/HTTP/PHPMYADMIN_NULL_TERMINATION_EXEC
last seen 2018-09-20
modified 2018-08-26
published 2018-06-18
reliability Excellent
reporter Rapid7
source https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/phpmyadmin_null_termination_exec.rb
title phpMyAdmin Authenticated Remote Code Execution
nessus via4
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_E7028E1D3F9B11E681F96805CA0B3D42.NASL
    description Please reference CVE/URL list for details
    last seen 2018-09-01
    modified 2018-06-19
    plugin id 91939
    published 2016-07-05
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=91939
    title FreeBSD : phpMyAdmin -- multiple vulnerabilities (e7028e1d-3f9b-11e6-81f9-6805ca0b3d42)
  • NASL family CGI abuses
    NASL id PHPMYADMIN_4_4_15_7.NASL
    description According to its self-reported version number, the phpMyAdmin application hosted on the remote web server is 4.4.x prior to 4.4.15.7. It is, therefore, affected by the following vulnerabilities: - A flaw exists in the setup/frames/index.inc.php script that allows an unauthenticated, remote attacker to access the program on a non-HTTPS connection and thereby inject arbitrary BBCode against HTTP sessions. (CVE-2016-5701) - A flaw exists in the libraries/central_columns.lib.php script when handling database names due to improper sanitization of user-supplied input. An unauthenticated, remote attacker can exploit this, via a crafted database name, to inject or manipulate SQL queries in the back-end database, resulting in modification or disclosure of arbitrary data. (CVE-2016-5703) - Multiple cross-site scripting (XSS) vulnerabilities exist due to improper validation of user-supplied input before returning it to users. An unauthenticated, remote attacker can exploit these, via specially crafted requests, to execute arbitrary script code or HTML in a a user's browser session. (CVE-2016-5705) - A flaw exists in the js/get_scripts.js.php script when handling a large array in the 'scripts' parameter during the loading of a crafted JavaScript file. An unauthenticated, remote attacker can exploit this to cause a denial of service condition. (CVE-2016-5706) - A information disclosure vulnerability exists in the Example OpenID Authentication and Setup scripts that allows an remote attacker, via multiple vectors, to disclose the application's installation path in an error message. (CVE-2016-5730) - A reflected cross-site scripting (XSS) vulnerability exists in the examples/openid.php script when handling OpenID error messages due to improper validation of input before returning it to users. An unauthenticated, remote attacker can exploit this, via a specially crafted request, to execute arbitrary script code in a user's browser session. (CVE-2016-5731) - Multiple cross-site scripting (XSS) vulnerabilities exist due to improper validation of user-supplied input before returning it to users. An unauthenticated, remote attacker can exploit these, via specially crafted requests, to execute arbitrary script code or HTML in a user's browser session. (CVE-2016-5733) - A flaw exists in the table search and replace feature due to improper sanitization of parameters before passing them to the preg_replace() function. An unauthenticated, remote attacker can exploit this, via a specially crafted string, to execute arbitrary PHP code. (CVE-2016-5734) - An information disclosure vulnerability exists in the libraries/Header.class.php script when handling transformations due to a failure to use the 'no-referer' Content Security Policy (CSP) protection mechanism. An unauthenticated, remote attacker can exploit this, via a specially crafted Transformation, to disclose sensitive authentication token information, which then can be potentially used to facilitate cross-site request forgery (XSRF) attacks. (CVE-2016-5739) Note that Nessus has not attempted to exploit these issues but has instead relied only on the application's self-reported version number.
    last seen 2018-09-02
    modified 2018-07-24
    plugin id 99662
    published 2017-04-25
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=99662
    title phpMyAdmin 4.4.x < 4.4.15.7 Multiple Vulnerabilities (PMASA-2016-17, PMASA-2016-19, PMASA-2016-21 - PMASA-2016-24, PMASA-2016-26 - PMASA-2016-28)
  • NASL family CGI abuses
    NASL id PHPMYADMIN_4_6_3.NASL
    description According to its self-reported version number, the phpMyAdmin application hosted on the remote web server is 4.6.x prior to 4.6.3. It is, therefore, affected by the following vulnerabilities: - A flaw exists in the setup/frames/index.inc.php script that allows an unauthenticated, remote attacker to access the program on a non-HTTPS connection and thereby inject arbitrary BBCode against HTTP sessions. (CVE-2016-5701) - An unspecified flaw exists, whenever the environment lacks a PHP_SELF value, that allows an unauthenticated, remote attacker to inject arbitrary attributes into browser cookies by using a specially crafted URI. (CVE-2016-5702) - A flaw exists in the libraries/central_columns.lib.php script when handling database names due to improper sanitization of user-supplied input. An unauthenticated, remote attacker can exploit this, via a crafted database name, to inject or manipulate SQL queries in the back-end database, resulting in modification or disclosure of arbitrary data. (CVE-2016-5703) - A cross-site scripting (XSS) vulnerability exists in the templates/table/structure/display_table_stats.phtml script when handling table comments due to improper validation of input before returning it to users. An unauthenticated, remote attacker can exploit this, via a specially crafted request, to execute arbitrary script code in a user's browser session. (CVE-2016-5704) - Multiple cross-site scripting (XSS) vulnerabilities exist due to improper validation of user-supplied input before returning it to users. An unauthenticated, remote attacker can exploit these, via specially crafted requests, to execute arbitrary script code or HTML in a a user's browser session. (CVE-2016-5705) - A flaw exists in the js/get_scripts.js.php script when handling a large array in the 'scripts' parameter during the loading of a crafted JavaScript file. An unauthenticated, remote attacker can exploit this to cause a denial of service condition. (CVE-2016-5706) - A information disclosure vulnerability exists in the Example OpenID Authentication and Setup scripts that allows an remote attacker, via multiple vectors, to disclose the application's installation path in an error message. (CVE-2016-5730) - A reflected cross-site scripting (XSS) vulnerability exists in the examples/openid.php script when handling OpenID error messages due to improper validation of input before returning it to users. An unauthenticated, remote attacker can exploit this, via a specially crafted request, to execute arbitrary script code in a user's browser session. (CVE-2016-5731) - A cross-site scripting (XSS) vulnerability exists in the templates/table/structure/display_partitions.phtml script when handling table parameters due to improper validation of input before returning it to users. An unauthenticated, remote attacker can exploit this, via a specially crafted request, to execute arbitrary script code in a user's browser session. (CVE-2016-5732) - Multiple cross-site scripting (XSS) vulnerabilities exist due to improper validation of user-supplied input before returning it to users. An unauthenticated, remote attacker can exploit these, via specially crafted requests, to execute arbitrary script code or HTML in a user's browser session. (CVE-2016-5733) - A flaw exists in the table search and replace feature due to improper sanitization of parameters before passing them to the preg_replace() function. An unauthenticated, remote attacker can exploit this, via a specially crafted string, to execute arbitrary PHP code. (CVE-2016-5734) - An information disclosure vulnerability exists in the libraries/Header.class.php script when handling transformations due to a failure to use the 'no-referer' Content Security Policy (CSP) protection mechanism. An unauthenticated, remote attacker can exploit this, via a specially crafted Transformation, to disclose sensitive authentication token information, which then can be potentially used to facilitate cross-site request forgery (XSRF) attacks. (CVE-2016-5739) Note that Nessus has not attempted to exploit these issues but has instead relied only on the application's self-reported version number.
    last seen 2018-09-02
    modified 2018-07-24
    plugin id 99663
    published 2017-04-25
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=99663
    title phpMyAdmin 4.6.x < 4.6.3 Multiple Vulnerabilities (PMASA-2016-17 - PMASA-2016-28)
  • NASL family CGI abuses
    NASL id PHPMYADMIN_4_0_10_16.NASL
    description According to its self-reported version number, the phpMyAdmin application hosted on the remote web server is 4.0.x prior to 4.0.10.16. It is, therefore, affected by the following vulnerabilities : - A flaw exists in the setup/frames/index.inc.php script that allows an unauthenticated, remote attacker to access the program on a non-HTTPS connection and thereby inject arbitrary BBCode against HTTP sessions. (CVE-2016-5701) - A flaw exists in the js/get_scripts.js.php script when handling a large array in the 'scripts' parameter during the loading of a crafted JavaScript file. An unauthenticated, remote attacker can exploit this to cause a denial of service condition. (CVE-2016-5706) - A information disclosure vulnerability exists in the Example OpenID Authentication and Setup scripts that allows an remote attacker, via multiple vectors, to disclose the application's installation path in an error message. (CVE-2016-5730) - A reflected cross-site scripting (XSS) vulnerability exists in the examples/openid.php script when handling OpenID error messages due to improper validation of input before returning it to users. An unauthenticated, remote attacker can exploit this, via a specially crafted request, to execute arbitrary script code in a user's browser session. (CVE-2016-5731) - Multiple cross-site scripting (XSS) vulnerabilities exist due to improper validation of user-supplied input before returning it to users. An unauthenticated, remote attacker can exploit these, via specially crafted requests, to execute arbitrary script code or HTML in a user's browser session. (CVE-2016-5733) - A flaw exists in the table search and replace feature due to improper sanitization of parameters before passing them to the preg_replace() function. An unauthenticated, remote attacker can exploit this, via a specially crafted string, to execute arbitrary PHP code. (CVE-2016-5734) - An information disclosure vulnerability exists in the libraries/Header.class.php script when handling transformations due to a failure to use the 'no-referer' Content Security Policy (CSP) protection mechanism. An unauthenticated, remote attacker can exploit this, via a specially crafted Transformation, to disclose sensitive authentication token information, which then can be potentially used to facilitate cross-site request forgery (XSRF) attacks. (CVE-2016-5739) Note that Nessus has not attempted to exploit these issues but has instead relied only on the application's self-reported version number.
    last seen 2018-09-01
    modified 2018-07-24
    plugin id 99661
    published 2017-04-25
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=99661
    title phpMyAdmin 4.0.x < 4.0.10.16 Multiple Vulnerabilities (PMASA-2016-17, PMASA-2016-22 - PMASA-2016-24, PMASA-2016-26 - PMASA-2016-28)
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-201701-32.NASL
    description The remote host is affected by the vulnerability described in GLSA-201701-32 (phpMyAdmin: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in phpMyAdmin. Please review the CVE identifiers referenced below for details. Impact : A authenticated remote attacker could exploit these vulnerabilities to execute arbitrary PHP Code, inject SQL code, or to conduct Cross-Site Scripting attacks. In certain configurations, an unauthenticated remote attacker could cause a Denial of Service condition. Workaround : There is no known workaround at this time.
    last seen 2018-09-01
    modified 2018-06-19
    plugin id 96426
    published 2017-01-12
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=96426
    title GLSA-201701-32 : phpMyAdmin: Multiple vulnerabilities
packetstorm via4
data source https://packetstormsecurity.com/files/download/148222/phpmyadmin_null_termination_exec.rb.txt
id PACKETSTORM:148222
last seen 2018-06-19
published 2018-06-18
reporter Matteo Cantoni
source https://packetstormsecurity.com/files/148222/phpMyAdmin-4.x-Remote-Code-Execution.html
title phpMyAdmin 4.x Remote Code Execution
refmap via4
bid 91387
confirm
gentoo GLSA-201701-32
Last major update 28-11-2016 - 15:29
Published 02-07-2016 - 21:59
Last modified 30-06-2017 - 21:29
Back to Top