Skip to main content
Mallory
CriticalCISA KEVExploited in the wildPublic exploit

PHP code injection in phpMyAdmin setup.php

IdentifiersCVE-2009-1151CWE-94· Improper Control of Generation of…

CVE-2009-1151 is a static code injection vulnerability in phpMyAdmin setup.php affecting phpMyAdmin 2.11.x before 2.11.9.5 and 3.x before 3.1.3.1. The vulnerable setup functionality allows a remote attacker to supply crafted input to the save action, resulting in arbitrary PHP code being written into a phpMyAdmin configuration file. Because the injected content is stored as PHP in the configuration, the flaw is not limited to data corruption; it enables execution of attacker-controlled PHP when the configuration is later processed by the application.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

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

Successful exploitation allows remote attackers to inject arbitrary PHP code into a phpMyAdmin configuration file, which can lead to full remote code execution in the context of the web server account. This can enable compromise of the phpMyAdmin instance, unauthorized access to database administration functions, theft or modification of database contents, deployment of webshells or other persistence mechanisms, and potential pivoting to the underlying host or adjacent systems depending on server configuration and privileges.

Mitigation

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

Restrict or disable access to phpMyAdmin setup functionality, especially from untrusted networks. Remove or block setup.php where it is not operationally required. Limit exposure of phpMyAdmin to trusted administrative networks, enforce strong authentication and network ACLs, and monitor configuration files for unexpected changes. If there is any indication the flaw was exploited, inspect the configuration for injected PHP, remove malicious code, and perform incident response on the host because arbitrary code execution may already have occurred.

Remediation

Patch, then assume compromise.

Upgrade phpMyAdmin to a fixed release: 2.11.9.5 or later in the 2.11 branch, or 3.1.3.1 or later in the 3.x branch. If upgrade paths are constrained, replace the vulnerable setup.php component with a patched version from a fixed release and verify that configuration-writing functionality no longer permits unsanitized PHP content to be saved. Review configuration files for unauthorized modifications and rotate credentials if compromise is suspected.
PUBLIC EXPLOITS

Exploits

2 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (3 hidden).

VALID 2 / 5 TOTALView more in app
PhpMyAdminMaturityPoCVerified exploit

This 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-ThugDisclosed Jun 24, 2023pythonnetwork
pocsMaturityPoCVerified exploit

This 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.

pagvacDisclosed Feb 3, 2018bashnetwork
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
DebianDebian Linuxoperating_system
PhpmyadminPhpmyadminapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

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, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence1

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.