dmsl/anyplace

XXE in GMapV2Direction.java via Man-in-the-Middle (MitM)

Closed this issue · 2 comments

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 DocumentBuilderFactory without securely disabling entities:

An attacker can Man-in-the-Middle (MitM) the HTTP call to the URL below:

String url = "http://maps.googleapis.com/maps/api/directions/xml?" + "origin=" + fromLatitude + "," + fromLongitude + "&destination=" + toPosition.lat + "," + toPosition.lng

Endpoint was made secure using https in v2.5.2

That's great @constambeys, thanks.