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.

Codelibs Fess 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.

Codelibs Fess admin backup functionality allows parsing of GSA XML files using an insecure XML parser.

Where the Issue Occurred

The code below retrieves the XML content and performs insecure XML parsing (found on line 115 - 118 fess/src/main/java/org/codelibs/fess/app/web/admin/backup/AdminBackupAction.java#115-118):

else if (fileName.startsWith("gsa") && fileName.endsWith(".xml")) {
	final GsaConfigParser configParser = ComponentUtil.getComponent(GsaConfigParser.class);
	try (final InputStream in = form.bulkFile.getInputStream()) {
	    configParser.parse(new InputSource(in));

Disclosure Timeline

  • Issue Reported: 29th September 2018
  • Blog Post Published: 27th October 2018
  • Applied for CVE: