CVE-2011-2506: phpMyAdmin vulnerable to static code injection
7.5
CVSS Score
Basic Information
CVE ID
GHSA ID
EPSS Score
0.9548%
CWE
Published
5/14/2022
Updated
1/15/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
AV:N/AC:L/Au:N/C:P/I:P/A:P
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
phpmyadmin/phpmyadmin | composer | >= 3.0, < 3.3.10.2 | 3.3.10.2 |
phpmyadmin/phpmyadmin | composer | >= 3.4, < 3.4.3.1 | 3.4.3.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how ConfigGenerator.class.php builds server configuration comments. The pre-patch code used strtr($cf->getServerName($id), '/', '-') but failed to sanitize the $id parameter appended in the comment. Attackers leveraging compromised session variables could craft a server ID like '/ {malicious_code} /', breaking out of the comment context. The commit 0fbedaf explicitly fixes this by sanitizing both server name and ID together via strtr($cf->getServerName($id)." [$id] ", '/', '-'), confirming this was the attack vector.