CVE-2025-54385
JSON

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 packageVersionsReported by
xwiki xwiki-platform< 16.10.6, >= 17.0.0-rc1, < 17.3.0-rc-1CVE 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-1GitHub Advisory Database
xwiki xwikibefore 16.10.6, from 17.0.0 up to 17.2.2NVD

All scores

GitHub_M8.6high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-20CWE-89

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

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:

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

SourceRecordLicence
CVE ListCVE-2025-54385 changed 2025-07-28CVE Terms of Use
GitHub Advisory DatabaseGHSA-p9qm-p942-q3w5 changed 2025-07-28CC-BY-4.0
NVDCVE-2025-54385 changed 2026-06-17Public domain