So, why is it possible to have XML files reading arbitrary stuff from whatever place again? XML is data . If your application needs to send a request for reading a file through XML this should really be explicit, not relying in a "permission happy" XML library, no?
Yes, XML is data, but it allows you to specify where other data is located that should be included when processing it. These links can be to addition data, or to definitions of how to process the data in the document (XML entities). It's a simplification, but it's as if XML can have #includes, where the source of the #include is a URL, and can even be a file:/// URL. So the attack looks like this: Server takes input…
I'm thinking there should be a "root path" for the library to be able to access files. Sure, you want to include "base.xml" it's in a specific directory and the library is allowed to read only that, and no "../../../../etc/password" tricks.