It's possible to execute any SQL query in Oracle by using the function like DBMS_XMLGEN or DBMS_XMLQUERY.
The XWiki#searchDocuments APIs are not sanitizing the query at all and even if they force a specific select, Hibernate allows using any native function in an HQL query (for example in the WHERE).
This has been patched in 16.10.6 and 17.3.0-rc-1.
There is no known workaround, other than upgrading XWiki.
https://jira.xwiki.org/browse/XWIKI-22728
If you have any questions or comments about this advisory:
{
"cwe_ids": [
"CWE-20",
"CWE-89"
],
"github_reviewed": true,
"github_reviewed_at": "2025-07-25T14:11:00Z",
"nvd_published_at": "2025-07-26T04:16:06Z",
"severity": "HIGH"
}