8.6high
XWiki Platform's searchDocuments API allows for SQL injection
- Severity
- 8.6high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.68% (higher than 53% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-p9qm-p942-q3w5
Description
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 DBMS_XMLGEN or DBMS_XMLQUERY. 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| xwiki xwiki-platform | < 16.10.6, >= 17.0.0-rc1, < 17.3.0-rc-1 | CVE List |
| org.xwiki.platform:xwiki-platform-oldcore (Maven) | from 1.0 before 16.10.6, from 17.0.0-rc1 before 17.3.0-rc-1 | GitHub Advisory Database |
| xwiki xwiki | before 16.10.6, from 17.0.0 up to 17.2.2 | NVD |
All scores
| GitHub_M | 8.6high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
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 DBMS_XMLGEN or DBMS_XMLQUERY. 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.
GitHub Advisory Database
Impact
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).
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
NVD (es)
La plataforma XWiki es una plataforma wiki genérica que ofrece servicios de ejecución para aplicaciones desarrolladas sobre ella. En las versiones 17.0.0-rc1 a 17.2.2 y 16.10.5 y anteriores, es posible ejecutar cualquier consulta SQL en Oracle mediante funciones como DBMS_XMLGEN o DBMS_XMLQUERY. Las API de XWiki#searchDocuments pasan las consultas directamente a Hibernate sin depurarlas. Incluso cuando estas API aplican una cláusula SELECT específica, los atacantes pueden inyectar código malicioso a través de la compatibilidad con funciones nativas de HQL en otras partes de la consulta (como la cláusula WHERE). Esto se ha corregido en las versiones 16.10.6 y 17.3.0-rc-1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-54385 changed 2025-07-28 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-p9qm-p942-q3w5 changed 2025-07-28 | CC-BY-4.0 |
| NVD | CVE-2025-54385 changed 2026-06-17 | Public domain |