0dd - The Zero (0) Day Division

The Zero (0) Day Division is a group of security professionals working towards a common goal; securing open-source projects.

Eclipse RDF4j XXE

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.

RDF4j contains the functionality to parse rdf files. These files are in XML format. 0dd identified that the parser used within the program was not securely implemented.

Where the Issue Occurred

The code snippets below create an XML parser which parses the rdf file passed to it: Found on line 188 rdf4j/rio/trix/src/main/java/org/eclipse/rdf4j/rio/trix/TriXParser.java#188:

saxParser.parse(inputStreamOrReader);

Found on line 328 rdf4j/rio/rdfxml/src/main/java/org/eclipse/rdf4j/rio/rdfxml/RDFXMLParser.java#328:

xmlReader.parse(inputSource);

Disclosure Timeline

  • Issue Reported: 19th July 2018
  • Issue Resolved: <TBD>
  • Blog Post Published: 5th August 2018
  • Applied for CVE: 8th August 2018