goxr3plus / XR3Player

🎧 🎼 The MOST ADVANCED JavaFX Media Player
https://xr3player.netlify.com/
GNU Lesser General Public License v3.0
726 stars 176 forks source link

XXE in Playlist Parsers #9

Open prodigysml opened 6 years ago

prodigysml commented 6 years ago

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:

https://github.com/wseemann/JavaPlaylistParser/blob/c2c6c9fb54d135b02cfe8d9452566997cd86d9b1/src/wseemann/media/jplaylistparser/parser/asx/ASXPlaylistParser.java#L136

Remediation

https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet

goxr3plus commented 6 years ago

@ProDigySML Wow , how did you found it out ? I mean am i using https://github.com/wseemann/JavaPlaylistParser inside the application and i didn't knew it :) ?