Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2009-1151: PHP Code Injection in phpMyAdmin Setup

Published Mar 26, 2009 · Updated 3 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days1 mention · peak 1 in a dayToday
CVSS9.8Critical · v3.1
EPSS96.6%100th percentile
CISA KEVYesAdded Mar 25, 2022
In the wildActivePer CISA KEV
Vendors
Debian ProjectPhpmyadmin
IdentifiersCVE-2009-1151CWE-94 · Improper Control of Generation of…

CVE-2009-1151 is a static code injection vulnerability in the setup functionality of phpMyAdmin 2.11.x before 2.11.9.5 and 3.x before 3.1.3.1. The setup script's save action permits remote attackers to inject arbitrary PHP code into a configuration file. Execution of the modified configuration enables attacker-controlled PHP code to run on the server. The vulnerability has been exploited to deploy SSH brute-force scanners and has been associated with server-compromise campaigns.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can compromise the confidentiality, integrity, and availability of resources accessible to the PHP process. Attackers can execute server-side code, modify application files, access accessible credentials and data, and deploy malicious tools. Exploitation has been associated with SSH scanning malware and remote command shells. Root privileges are not an inherent outcome; some observed compromises additionally involved a separate local privilege-escalation exploit.

Mitigation

If you can’t patch tonight, do this now.

Restrict access to phpMyAdmin, particularly its setup functionality, using web-server access controls or network restrictions that permit only trusted administrative systems. Avoid exposing the administrative interface directly to the Internet.

Remediation

Patch, then assume compromise.

Upgrade affected phpMyAdmin installations to a currently supported release. The historical fixes were released in versions 2.11.9.5 and 3.1.3.1 for their respective branches. If compromise is suspected, inspect configuration and application files for injected code and remove unauthorized shells and malware; upgrading alone does not remove an existing compromise.

Public exploits

Exploits

3 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 2 not yet analyzed, such as Exploit-DB entries.

View more in app →
phpmyadmin_config.rbThis repository contains a single Metasploit module (modules/exploits/unix/webapp/phpmyadmin_config.rb) that exploits a code injection vulnerability in phpMyAdmin's setup script (CVE-2009-1151). The exploit targets phpMyAdmin versions 2.11.x < 2.11.9.5 and 3.x < 3.1.3.1, allowing an attacker to inject arbitrary PHP code into the configuration file (config/config.inc.php) by abusing the setup script (scripts/setup.php). The module first retrieves a CSRF token and session cookie from the setup script, then crafts a malicious configuration payload containing the attacker's PHP code, and submits it via a POST request. Finally, it triggers execution of the payload by requesting the modified config file. The exploit is fully weaponized, supporting arbitrary PHP payloads via the Metasploit framework. The main attack vector is network-based, requiring HTTP access to the vulnerable phpMyAdmin instance. The repository is structured as a single Ruby file compatible with Metasploit, and all relevant logic is contained within this file.Disclosed Mar 24, 2009 · Framework: metasploit · ruby · networkWeaponizedpocsThis repository contains a Bash proof-of-concept exploit for CVE-2009-1151, a remote code execution vulnerability in phpMyAdmin versions 2.11.x before 2.11.9.5 and 3.x before 3.1.3.1. The exploit targets phpMyAdmin installations where the setup wizard was used and the /config/ directory remains present. The main script, minervais.com.phpMyAdminRCE.sh, automates the exploitation process by sending crafted POST requests to /scripts/setup.php to inject PHP code into config.inc.php. Once injected, the attacker can execute arbitrary shell commands or PHP code via HTTP GET parameters to config.inc.php. The repository includes a README with usage instructions and a demonstration. The exploit requires curl and is operational against network-accessible phpMyAdmin instances. No fake or detection-only scripts are present; the code is a functional exploit.pagvac · Disclosed Feb 3, 2018 · bash · networkPoCPhpMyAdminThis repository contains a Python script (x.py) that is a port of an old Perl scanner/exploit for a phpMyAdmin vulnerability from around 2009. The script takes a list of target hosts and attempts to access the /phpmyadmin/scripts/setup.php endpoint on each, checking for signs of a vulnerable phpMyAdmin installation. If found, it extracts a CSRF token and version information from the response, crafts a serialized PHP object payload (potentially for remote file inclusion or code execution), and sends it via a POST request to the same endpoint. The script uses multithreading to scan multiple hosts in parallel and reports which hosts are vulnerable, including the detected phpMyAdmin version. The main exploit logic is contained in x.py, and there are no other code files. The script is operational and could be used to identify and exploit vulnerable phpMyAdmin instances, but it targets a very old vulnerability and is primarily of historical or educational interest.e-Thug · Disclosed Jun 24, 2023 · python · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Debian ProjectDebian Linuxoperating_system
PhpmyadminPhpmyadminapplication
FAQ

Frequently asked questions

Is CVE-2009-1151 exploited in the wild?
Yes. As of Nov 15, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Mar 25, 2022.
Is there a public exploit for CVE-2009-1151?
Yes. Mallory tracks 3 public exploits or proofs of concept for CVE-2009-1151, the earliest disclosed Mar 24, 2009.
Is there a patch for CVE-2009-1151?
Upgrade affected phpMyAdmin installations to a currently supported release. The historical fixes were released in versions 2.11.9.5 and 3.1.3.1 for their respective branches.
What products are affected by CVE-2009-1151?
Phpmyadmin and Debian Project Debian Linux.
How severe is CVE-2009-1151?
CVE-2009-1151 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 96.6% (100th percentile) as of Nov 15, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence1Every report linking this CVE to a named adversary.
Associated malware1Malware families linked to this CVE, with evidence and IOCs.
Detection signatures3YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity1Community discussion across Reddit, Mastodon, and other social sources.