FreeCol: FreeCol is a turn-based strategy game based on the old game Colonization, and similar to Civilization. The objective of the game is to create an independent nation.
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 following code snippets display the usage of XMLInputFactory without securely disabling entities:
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 following code snippets display the usage of
XMLInputFactory
without securely disabling entities:https://github.com/FreeCol/freecol/blob/ef284d78a4dd2337d43c68d929423b5ab423a0b0/src/net/sf/freecol/common/io/FreeColXMLReader.java#L149
Remediation
https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet