Php my-admin hack
phpMyAdmin: file reading via XML
Synthesis of the vulnerability
An attacker can provide XML data using an external entity, in order to access to the content of a file or to create a denial of service.
Creation date: 04/11/2011.
Description of the vulnerability
The phpMyAdmin program is used to administer a MySQL database. It has a plugin to import data in XML format.
XML data can contain external entities (DTD):
<!ENTITY name SYSTEM "file">
<!ENTITY name SYSTEM "http://server/file">
A program which reads these XML data can replace these entities by data coming from the indicated file. When the program uses XML data coming from an untrusted source, this behavior leads to:
- content disclosure from files of the server
- private web site scan
- a denial of service by opening a blocking file
This feature thus must be disabled to process data coming from an untrusted source.
However, phpMyAdmin does not disable this feature.
An attacker can therefore provide XML data using an external entity, in order to access to the content of a file or to create a denial of service.