Vigil@nce - Python: file reading via sax and pulldom
March 2013 by Vigil@nce
This bulletin was written by Vigil@nce : http://vigilance.fr/offer
SYNTHESIS OF THE VULNERABILITY
An attacker can transmit malicious XML data to a Python
application, in order to force it to include a file, which can
then be returned to the attacker.
Impacted products: Unix (platform)
Severity: 2/4
Creation date: 20/02/2013
DESCRIPTION OF THE VULNERABILITY
XML data can contain external entities (DTD):
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 XML data coming from
an untrusted source.
However, the Python sax and pulldom libraries allow external
entities.
An attacker can therefore transmit malicious XML data to a Python
application, in order to force it to include a file, which can
then be returned to the attacker.
ACCESS TO THE COMPLETE VIGIL@NCE BULLETIN
http://vigilance.fr/vulnerability/Python-file-reading-via-sax-and-pulldom-12443