Description
The Issue
An XML External Entity attack is a type of attack against an application that parses XML input. This attack occurs when XML input containing a reference to an external entity is processed by a weakly configured XML parser. This attack may lead to the disclosure of confidential data, denial of service, server side request forgery, port scanning from the perspective of the machine where the parser is located, and other system impacts.
Where the Issue Occurred
The line of code given below create an XML parser for parsing an XML file opened and parses the data within:
https://github.com/oswetto/LoboEvolution/blob/6d3c29a58336e9f1ef6853b558663cfe7e9bbeb8/HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java#L93
This parsing is done in an insecure manner and does not prohibit the usage of XML external entities. This allows attackers to do the above-mentioned attacks on a targeted user.
Attack Scenario
An attacker can simply give a LoboEvolution user an XML file (or maybe the user downloads the file off an untrusted website). The user then opens the file in the browser and triggers the XML parser, cause the vulnerability to be triggered.
PoC File
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://0dd.zone">
]>
<r>&sp;</r>