ID CVE-2009-1151
Summary Static code injection vulnerability in setup.php in phpMyAdmin 2.11.x before 2.11.9.5 and 3.x before 3.1.3.1 allows remote attackers to inject arbitrary PHP code into a configuration file via the save action.
References
Vulnerable Configurations
  • phpMYAdmin 2.11.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.0
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.0:beta1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.0:beta1
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.0:rc1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.0:rc1
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.1
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.1:rc1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.1:rc1
  • phpMYAdmin 2.11.1.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.1.0
  • phpMYAdmin 2.11.1.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.1.1
  • phpMYAdmin 2.11.1.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.1.2
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.2
  • phpMYAdmin 2.11.2.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.2.0
  • phpMYAdmin 2.11.2.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.2.1
  • phpMYAdmin 2.11.2.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.2.2
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.3
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.3
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.3:rc1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.3:rc1
  • phpMYAdmin 2.11.3.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.3.0
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.4
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.4
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.4:rc1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.4:rc1
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.5
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.5
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.5:rc1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.5:rc1
  • phpMYAdmin 2.11.5.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.5.0
  • phpMYAdmin 2.11.5.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.5.1
  • phpMYAdmin 2.11.5.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.5.2
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.6
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.6
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.6:rc1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.6:rc1
  • phpMYAdmin 2.11.6.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.6.0
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.7
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.7
  • phpMYAdmin 2.11.7.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.7.0
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.8
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.8
  • cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.9
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.9
  • phpMYAdmin 2.11.9.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.9.0
  • phpMYAdmin 2.11.9.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.9.1
  • phpMYAdmin 2.11.9.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.9.2
  • phpMYAdmin 2.11.9.3
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.9.3
  • phpMYAdmin 2.11.9.4
    cpe:2.3:a:phpmyadmin:phpmyadmin:2.11.9.4
  • phpMYAdmin 3.1.0
    cpe:2.3:a:phpmyadmin:phpmyadmin:3.1.0
  • phpMYAdmin 3.1.1
    cpe:2.3:a:phpmyadmin:phpmyadmin:3.1.1
  • phpMYAdmin 3.1.1 release candidate 1
    cpe:2.3:a:phpmyadmin:phpmyadmin:3.1.1:rc1
  • phpMYAdmin 3.1.2
    cpe:2.3:a:phpmyadmin:phpmyadmin:3.1.2
  • phpMYAdmin 3.1.2 release candidate 1
    cpe:2.3:a:phpmyadmin:phpmyadmin:3.1.2:rc1
  • phpMYAdmin 3.1.3
    cpe:2.3:a:phpmyadmin:phpmyadmin:3.1.3
  • phpMYAdmin 3.1.3 release candidate 1
    cpe:2.3:a:phpmyadmin:phpmyadmin:3.1.3:rc1
CVSS
Base: 7.5 (as of 26-03-2009 - 11:21)
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
d2sec via4
name Phpmyadmin File Upload
url http://www.d2sec.com/exploits/phpmyadmin_file_upload.html
exploit-db via4
  • description phpMyAdmin (/scripts/setup.php) PHP Code Injection Exploit. CVE-2009-1151. Webapps exploit for php platform
    file exploits/php/webapps/8921.sh
    id EDB-ID:8921
    last seen 2016-02-01
    modified 2009-06-09
    platform php
    port
    published 2009-06-09
    reporter Adrian "pagvac" Pastor
    source https://www.exploit-db.com/download/8921/
    title phpMyAdmin /scripts/setup.php PHP Code Injection Exploit
    type webapps
  • description PhpMyAdmin Config File Code Injection. CVE-2009-1151. Webapps exploit for php platform
    id EDB-ID:16913
    last seen 2016-02-02
    modified 2010-07-03
    published 2010-07-03
    reporter metasploit
    source https://www.exploit-db.com/download/16913/
    title PhpMyAdmin Config File Code Injection
  • description pmaPWN! - phpMyAdmin Code Injection RCE Scanner & Exploit. CVE-2009-1151. Webapps exploit for php platform
    id EDB-ID:8992
    last seen 2016-02-01
    modified 2009-06-22
    published 2009-06-22
    reporter Hacking Expose!
    source https://www.exploit-db.com/download/8992/
    title pmaPWN! - phpMyAdmin Code Injection RCE Scanner & Exploit
metasploit via4
description This module exploits a vulnerability in phpMyAdmin's setup feature which allows an attacker to inject arbitrary PHP code into a configuration file. The original advisory says the vulnerability is present in phpMyAdmin versions 2.11.x < 2.11.9.5 and 3.x < 3.1.3.1; this module was tested on 3.0.1.1. The file where our payload is written (phpMyAdmin/config/config.inc.php) is not directly used by the system, so it may be a good idea to either delete it or copy the running config (phpMyAdmin/config.inc.php) over it after successful exploitation.
id MSF:EXPLOIT/UNIX/WEBAPP/PHPMYADMIN_CONFIG
last seen 2018-12-13
modified 2017-09-08
published 2009-11-16
reliability Excellent
reporter Rapid7
source https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/unix/webapp/phpmyadmin_config.rb
title PhpMyAdmin Config File Code Injection
nessus via4
  • NASL family SuSE Local Security Checks
    NASL id SUSE_11_0_PHPMYADMIN-090401.NASL
    description This update of phpMyAdmin fixes multiple vulnerabilities : - CVE-2009-1148: directory traversal - CVE-2009-1149: CRLF injection - CVE-2009-1150: cross-site scripting - CVE-2009-1151: static code injection
    last seen 2019-02-08
    modified 2019-02-07
    plugin id 40108
    published 2009-07-21
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=40108
    title openSUSE Security Update : phpMyAdmin (phpMyAdmin-711)
  • NASL family SuSE Local Security Checks
    NASL id SUSE_PHPMYADMIN-6133.NASL
    description This update of phpMyAdmin fixes multiple vulnerabilities : - CVE-2009-1148: directory traversal - CVE-2009-1149: CRLF injection - CVE-2009-1150: cross-site scripting - CVE-2009-1151: static code injection
    last seen 2018-09-02
    modified 2016-12-22
    plugin id 36081
    published 2009-04-03
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=36081
    title openSUSE 10 Security Update : phpMyAdmin (phpMyAdmin-6133)
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-200906-03.NASL
    description The remote host is affected by the vulnerability described in GLSA-200906-03 (phpMyAdmin: Multiple vulnerabilities) Multiple vulnerabilities have been reported in phpMyAdmin: Greg Ose discovered that the setup script does not sanitize input properly, leading to the injection of arbitrary PHP code into the configuration file (CVE-2009-1151). Manuel Lopez Gallego and Santiago Rodriguez Collazo reported that data from cookies used in the 'Export' page is not properly sanitized (CVE-2009-1150). Impact : A remote unauthorized attacker could exploit the first vulnerability to execute arbitrary code with the privileges of the user running phpMyAdmin and conduct Cross-Site Scripting attacks using the second vulnerability. Workaround : Removing the 'scripts/setup.php' file protects you from CVE-2009-1151.
    last seen 2019-02-21
    modified 2019-02-07
    plugin id 39570
    published 2009-06-30
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=39570
    title GLSA-200906-03 : phpMyAdmin: Multiple vulnerabilities
  • NASL family Debian Local Security Checks
    NASL id DEBIAN_DSA-1824.NASL
    description Several remote vulnerabilities have been discovered in phpMyAdmin, a tool to administer MySQL over the web. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2009-1150 Cross site scripting vulnerability in the export page allow for an attacker that can place crafted cookies with the user to inject arbitrary web script or HTML. - CVE-2009-1151 Static code injection allows for a remote attacker to inject arbitrary code into phpMyAdmin via the setup.php script. This script is in Debian under normal circumstances protected via Apache authentication. However, because of a recent worm based on this exploit, we are patching it regardless, to also protect installations that somehow still expose the setup.php script.
    last seen 2019-02-21
    modified 2019-02-07
    plugin id 39569
    published 2009-06-30
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=39569
    title Debian DSA-1824-1 : phpmyadmin - several vulnerabilities
  • NASL family CGI abuses
    NASL id PHPMYADMIN_PMASA_2009_3.NASL
    description The setup script included with the version of phpMyAdmin installed on the remote host does not properly sanitize user-supplied input to several variables before using them to generate a config file for the application. Using specially crafted POST requests, an unauthenticated, remote attacker may be able to leverage this issue to execute arbitrary PHP code. Note that the application is also reportedly affected by several other issues, although Nessus has not actually checked for them.
    last seen 2019-02-21
    modified 2018-07-24
    plugin id 36170
    published 2009-04-16
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=36170
    title phpMyAdmin setup.php save Action Arbitrary PHP Code Injection (PMASA-2009-3)
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_06F9174F190F11DEB2F0001C2514716C.NASL
    description phpMyAdmin reports : Setup script used to generate configuration can be fooled using a crafted POST request to include arbitrary PHP code in generated configuration file.
    last seen 2019-02-21
    modified 2019-02-07
    plugin id 36012
    published 2009-03-25
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=36012
    title FreeBSD : phpmyadmin -- insufficient output sanitizing when generating configuration file (06f9174f-190f-11de-b2f0-001c2514716c)
packetstorm via4
refmap via4
bid 34236
bugtraq 20090609 CVE-2009-1151: phpMyAdmin Remote Code Execution Proof of Concept
confirm
debian DSA-1824
exploit-db 8921
gentoo GLSA-200906-03
mandriva MDVSA-2009:115
misc
secunia
  • 34430
  • 34642
  • 35585
  • 35635
suse SUSE-SR:2009:008
Last major update 15-07-2009 - 00:00
Published 26-03-2009 - 10:30
Last modified 10-10-2018 - 15:34
Back to Top