Executing XPATH expressions is security-sensitive. It has led in the past to the following vulnerabilities:

* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6272[CVE-2016-6272]
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9149[CVE-2016-9149]
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-4837[CVE-2012-4837]

User-provided data such as URL parameters should always be considered as untrusted and tainted. Constructing XPath expressions directly from tainted data enables attackers to inject specially crafted values that changes the initial meaning of the expression itself. Successful XPath injections attacks can read sensitive information from the XML document.
