CVE-2025-54385: XWiki Platform's searchDocuments API allows for SQL injection
Impact
It's possible to execute any SQL query in Oracle by using the function like DBMSXMLGEN or DBMSXMLQUERY.
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).
Patches
This has been patched in 16.10.6 and 17.3.0-rc-1.
Workarounds
There is no known workaround, other than upgrading XWiki.
References
https://jira.xwiki.org/browse/XWIKI-22728
For more information
If you have any questions or comments about this advisory: Open an issue in Jira XWiki.org Email us at Security Mailing List
Other sources
XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. In versions between 17.0.0-rc1 to 17.2.2 and versions 16.10.5 and below, it's possible to execute any SQL query in Oracle by using the function like DBMSXMLGEN or DBMSXMLQUERY. The XWiki#searchDocuments APIs pass queries directly to Hibernate without sanitization. Even when these APIs enforce a specific SELECT clause, attackers can still inject malicious code through HQL's native function support in other parts of the query (such as the WHERE clause). This is fixed in versions 16.10.6 and 17.3.0-rc-1.
— MITRE
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2025-54385?
CVE-2025-54385 has a high severity rating due to its potential for arbitrary SQL query execution in Oracle.
How do I fix CVE-2025-54385?
To remediate CVE-2025-54385, update to version 17.3.0-rc-1 or 16.10.6 of the affected XWiki software.
What versions are affected by CVE-2025-54385?
CVE-2025-54385 affects XWiki versions between 17.0.0-rc1 to 17.3.0-rc-1 and all versions prior to 16.10.6.
What are the implications of CVE-2025-54385?
CVE-2025-54385 can allow attackers to execute arbitrary SQL queries, potentially leading to data leakage or manipulation.
Is there a workaround for CVE-2025-54385?
Currently, the recommended action is to upgrade to a secure version, as there are no known effective workarounds.