Vulnerability & Exploit Database

Back to search

PhpMyAdmin Config File Code Injection

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 < and 3.x <; this module was tested on The file where our payload is written (phpMyAdmin/config/ is not directly used by the system, so it may be a good idea to either delete it or copy the running config (phpMyAdmin/ over it after successful exploitation.

Free Metasploit Download

Get your copy of the world's leading penetration testing tool

 Download Now

Module Name



  • Greg Ose
  • pagvac
  • egypt <egypt [at]>



  • Automatic (phpMyAdmin 2.11.x < and 3.x <


  • php


  • php



Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/unix/webapp/phpmyadmin_config msf exploit(phpmyadmin_config) > show targets ...targets... msf exploit(phpmyadmin_config) > set TARGET <target-id> msf exploit(phpmyadmin_config) > show options and set options... msf exploit(phpmyadmin_config) > exploit

Related Vulnerabilities