Medium severity6.5NVD Advisory· Published Nov 17, 2011· Updated Apr 29, 2026
CVE-2011-4107
CVE-2011-4107
Description
The simplexml_load_string function in the XML import plug-in (libraries/import/xml.php) in phpMyAdmin 3.4.x before 3.4.7.1 and 3.3.x before 3.3.10.5 allows remote authenticated users to read arbitrary files via XML data containing external entity references, aka an XML external entity (XXE) injection attack.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
phpmyadmin/phpmyadminPackagist | >= 3.4.0, < 3.4.7.1 | 3.4.7.1 |
phpmyadmin/phpmyadminPackagist | >= 3.3.0, < 3.3.10.5 | 3.3.10.5 |
Affected products
5- cpe:2.3:o:debian:debian_linux:5.0:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:14:*:*:*:*:*:*:*+ 2 more
- cpe:2.3:o:fedoraproject:fedora:14:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:15:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:16:*:*:*:*:*:*:*
Patches
434d99de000deDisable XML loading plugins on old PHP
2 files changed · +16 −6
libraries/import/ods.php+8 −3 modified@@ -13,6 +13,13 @@ exit; } +/** + * We need way to disable external XML entities processing. + */ +if (!function_exists('libxml_disable_entity_loader')) { + return; +} + /** * The possible scopes for $plugin_param are: 'table', 'database', and 'server' */ @@ -66,9 +73,7 @@ /** * Disable loading of external XML entities. */ -if (function_exists('libxml_disable_entity_loader')) { - libxml_disable_entity_loader(); -} +libxml_disable_entity_loader(); /** * Load the XML string
libraries/import/xml.php+8 −3 modified@@ -12,6 +12,13 @@ exit; } +/** + * We need way to disable external XML entities processing. + */ +if (!function_exists('libxml_disable_entity_loader')) { + return; +} + /** * The possible scopes for $plugin_param are: 'table', 'database', and 'server' */ @@ -59,9 +66,7 @@ /** * Disable loading of external XML entities. */ -if (function_exists('libxml_disable_entity_loader')) { - libxml_disable_entity_loader(); -} +libxml_disable_entity_loader(); /** * Load the XML string
2fbf631384fdDisable XML loading plugins on old PHP
2 files changed · +16 −6
libraries/import/ods.php+8 −3 modified@@ -13,6 +13,13 @@ exit; } +/** + * We need way to disable external XML entities processing. + */ +if (!function_exists('libxml_disable_entity_loader')) { + return; +} + /** * The possible scopes for $plugin_param are: 'table', 'database', and 'server' */ @@ -64,9 +71,7 @@ /** * Disable loading of external XML entities. */ -if (function_exists('libxml_disable_entity_loader')) { - libxml_disable_entity_loader(); -} +libxml_disable_entity_loader(); /** * Load the XML string
libraries/import/xml.php+8 −3 modified@@ -12,6 +12,13 @@ exit; } +/** + * We need way to disable external XML entities processing. + */ +if (!function_exists('libxml_disable_entity_loader')) { + return; +} + /** * The possible scopes for $plugin_param are: 'table', 'database', and 'server' */ @@ -59,9 +66,7 @@ /** * Disable loading of external XML entities. */ -if (function_exists('libxml_disable_entity_loader')) { - libxml_disable_entity_loader(); -} +libxml_disable_entity_loader(); /** * Load the XML string
a5e206fbd2caDisable loading of external XML entities when loading XML
2 files changed · +33 −19
libraries/import/ods.php+7 −0 modified@@ -63,6 +63,13 @@ unset($data); +/** + * Disable loading of external XML entities. + */ +if (function_exists('libxml_disable_entity_loader')) { + libxml_disable_entity_loader(); +} + /** * Load the XML string *
libraries/import/xml.php+26 −19 modified@@ -56,6 +56,13 @@ unset($data); +/** + * Disable loading of external XML entities. + */ +if (function_exists('libxml_disable_entity_loader')) { + libxml_disable_entity_loader(); +} + /** * Load the XML string * @@ -141,19 +148,19 @@ * Get structures for all tables */ $struct = $xml->children($namespaces['pma']); - + $create = array(); - + foreach ($struct as $tier1 => $val1) { foreach($val1 as $tier2 => $val2) { /* Need to select the correct database for the creation of tables, views, triggers, etc. */ /** - * @todo Generating a USE here blocks importing of a table - * into another database. + * @todo Generating a USE here blocks importing of a table + * into another database. */ $attrs = $val2->attributes(); $create[] = "USE " . PMA_backquote($attrs["name"]); - + foreach ($val2 as $val3) { /** * Remove the extra cosmetic spacing @@ -163,7 +170,7 @@ } } } - + $struct_present = true; } @@ -179,25 +186,25 @@ */ if (@count($xml->children())) { $data_present = true; - + /** * Process all database content */ foreach ($xml as $k1 => $v1) { $tbl_attr = $v1->attributes(); - + $isInTables = false; for ($i = 0; $i < count($tables); ++$i) { if (! strcmp($tables[$i][TBL_NAME], (string)$tbl_attr['name'])) { $isInTables = true; break; } } - + if ($isInTables == false) { $tables[] = array((string)$tbl_attr['name']); } - + foreach ($v1 as $k2 => $v2) { $row_attr = $v2->attributes(); if (! array_search((string)$row_attr['name'], $tempRow)) @@ -206,17 +213,17 @@ } $tempCells[] = (string)$v2; } - + $rows[] = array((string)$tbl_attr['name'], $tempRow, $tempCells); - + $tempRow = array(); $tempCells = array(); } - + unset($tempRow); unset($tempCells); unset($xml); - + /** * Bring accumulated rows into the corresponding table */ @@ -227,17 +234,17 @@ if (! isset($tables[$i][COL_NAMES])) { $tables[$i][] = $rows[$j][COL_NAMES]; } - + $tables[$i][ROWS][] = $rows[$j][ROWS]; } } } - + unset($rows); - + if (! $struct_present) { $analyses = array(); - + $len = count($tables); for ($i = 0; $i < $len; ++$i) { $analyses[] = PMA_analyzeTable($tables[$i]); @@ -289,7 +296,7 @@ if ($db_name === NULL) { $db_name = 'XML_DB'; } - + /* Set database collation/charset */ $options = array( 'db_collation' => $collation,
5fa86b8e8156Disable loading of external XML entities when loading XML
2 files changed · +33 −19
libraries/import/ods.php+7 −0 modified@@ -61,6 +61,13 @@ unset($data); +/** + * Disable loading of external XML entities. + */ +if (function_exists('libxml_disable_entity_loader')) { + libxml_disable_entity_loader(); +} + /** * Load the XML string *
libraries/import/xml.php+26 −19 modified@@ -56,6 +56,13 @@ unset($data); +/** + * Disable loading of external XML entities. + */ +if (function_exists('libxml_disable_entity_loader')) { + libxml_disable_entity_loader(); +} + /** * Load the XML string * @@ -141,19 +148,19 @@ * Get structures for all tables */ $struct = $xml->children($namespaces['pma']); - + $create = array(); - + foreach ($struct as $tier1 => $val1) { foreach($val1 as $tier2 => $val2) { /* Need to select the correct database for the creation of tables, views, triggers, etc. */ /** - * @todo Generating a USE here blocks importing of a table - * into another database. + * @todo Generating a USE here blocks importing of a table + * into another database. */ $attrs = $val2->attributes(); $create[] = "USE " . PMA_backquote($attrs["name"]); - + foreach ($val2 as $val3) { /** * Remove the extra cosmetic spacing @@ -163,7 +170,7 @@ } } } - + $struct_present = true; } @@ -179,25 +186,25 @@ */ if (@count($xml->children())) { $data_present = true; - + /** * Process all database content */ foreach ($xml as $k1 => $v1) { $tbl_attr = $v1->attributes(); - + $isInTables = false; for ($i = 0; $i < count($tables); ++$i) { if (! strcmp($tables[$i][TBL_NAME], (string)$tbl_attr['name'])) { $isInTables = true; break; } } - + if ($isInTables == false) { $tables[] = array((string)$tbl_attr['name']); } - + foreach ($v1 as $k2 => $v2) { $row_attr = $v2->attributes(); if (! array_search((string)$row_attr['name'], $tempRow)) @@ -206,17 +213,17 @@ } $tempCells[] = (string)$v2; } - + $rows[] = array((string)$tbl_attr['name'], $tempRow, $tempCells); - + $tempRow = array(); $tempCells = array(); } - + unset($tempRow); unset($tempCells); unset($xml); - + /** * Bring accumulated rows into the corresponding table */ @@ -227,17 +234,17 @@ if (! isset($tables[$i][COL_NAMES])) { $tables[$i][] = $rows[$j][COL_NAMES]; } - + $tables[$i][ROWS][] = $rows[$j][ROWS]; } } } - + unset($rows); - + if (! $struct_present) { $analyses = array(); - + $len = count($tables); for ($i = 0; $i < $len; ++$i) { $analyses[] = PMA_analyzeTable($tables[$i]); @@ -289,7 +296,7 @@ if ($db_name === NULL) { $db_name = 'XML_DB'; } - + /* Set database collation/charset */ $options = array( 'db_collation' => $collation,
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
23- www.phpmyadmin.net/home_page/security/PMASA-2011-17.phpnvdPatchVendor AdvisoryWEB
- packetstormsecurity.org/files/view/106511/phpmyadmin-fileread.txtnvdBroken LinkExploitWEB
- seclists.org/fulldisclosure/2011/Nov/21nvdExploitMailing ListThird Party AdvisoryWEB
- www.wooyun.org/bugs/wooyun-2010-03185nvdBroken LinkExploit
- bugzilla.redhat.com/show_bug.cginvdExploitIssue TrackingWEB
- lists.fedoraproject.org/pipermail/package-announce/2011-November/069625.htmlnvdMailing ListThird Party AdvisoryWEB
- lists.fedoraproject.org/pipermail/package-announce/2011-November/069635.htmlnvdMailing ListThird Party AdvisoryWEB
- lists.fedoraproject.org/pipermail/package-announce/2011-November/069649.htmlnvdMailing ListThird Party AdvisoryWEB
- secunia.com/advisories/46447nvdBroken LinkVendor Advisory
- www.securityfocus.com/bid/50497nvdBroken LinkThird Party AdvisoryVDB Entry
- exchange.xforce.ibmcloud.com/vulnerabilities/71108nvdThird Party AdvisoryVDB EntryWEB
- github.com/advisories/GHSA-q4mm-89q2-xffgghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2011-4107ghsaADVISORY
- osvdb.org/76798nvdBroken Link
- securityreason.com/securityalert/8533nvdBroken LinkWEB
- www.debian.org/security/2012/dsa-2391nvdMailing ListWEB
- www.mandriva.com/security/advisoriesnvdBroken Link
- www.openwall.com/lists/oss-security/2011/11/03/3nvdMailing ListWEB
- www.openwall.com/lists/oss-security/2011/11/03/5nvdMailing ListWEB
- github.com/phpmyadmin/phpmyadmin/commit/2fbf631384fd8cded55f4500cb87b129442f9ed2ghsaWEB
- github.com/phpmyadmin/phpmyadmin/commit/34d99de000de9d15cfdf5e9cc8b7682d51110bbdghsaWEB
- github.com/phpmyadmin/phpmyadmin/commit/5fa86b8e81565c15ddbc359e8f59ecd829a2b717ghsaWEB
- github.com/phpmyadmin/phpmyadmin/commit/a5e206fbd2ca814042cfc1bb7dd3b40c28ce3fb5ghsaWEB
News mentions
0No linked articles in our index yet.