From 99e6f774ce804e6c5102398f1351236d78591e4c Mon Sep 17 00:00:00 2001
From: Bernd
+ Warning: XPath expressions can contain functions, which can trigger resource consumption + and also have direct access to Java classes and methods. When working with object input also + XPath navigation can cause methods being invoked on this input graphs. For this reason XPath + expressions MUST NOT be constructed from untrusted input or allow untrusted users + to influence them. This can lead to all kind of security critical behavior including remote + code execution RCE. Also mind injection attacks if you plan string concatenation for XPath + expressions. A (meanwhile rejected) vulnerability entry (CVE-2022-41852) exists for + this topic. It was rejected because the behavior is by design - XPath is intended as a powerful + scripting and expression language. However, improvements (like function allow lists) are planned + for future releases. +
JXPath documentation currently contains: