XWiki Platform has an SQL injection in getdocuments.vm with sort parameter
Description
XWiki Platform is a generic wiki platform. Starting in version 6.3-milestone-2 and prior to versions 13.10.5 and 14.3-rc-1, in getdocument.vm; the ordering of the returned documents is defined from an unsanitized request parameter (request.sort) and can allow any user to inject HQL. 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 has been patched in 13.10.5 and 14.3-rc-1. There is no known workaround, other than upgrading XWiki.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
org.xwiki.platform:xwiki-platform-distribution-warMaven | >= 6.3-milestone-2, < 13.10.5 | 13.10.5 |
org.xwiki.platform:xwiki-platform-distribution-warMaven | >= 14.0-rc-1, < 14.3-rc-1 | 14.3-rc-1 |
Affected products
1- Range: >= 6.3-milestone-2, < 13.10.5
Patches
1673076e2e8b8XWIKI-17568: clean sort parameter value
1 file changed · +4 −4
xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/main/resources/templates/getdocuments.vm+4 −4 modified@@ -80,12 +80,12 @@ $response.setContentType("application/json") ## ORDER ## #set ($order = "$!request.sort") -#if (!$regextool.compile('^(doc\.)?\w+$').matcher($order).matches()) - { "error" : "invalid sort parameter" } - #stop ("invalid sort parameter [$order] found") -#end #set ($orderQueryPart = '') #if ($order != '') + #if (!$regextool.compile('^(doc\.)?\w+$').matcher($order).matches()) + { "error" : "invalid sort parameter" } + #stop ("invalid sort parameter [$order] found") + #end #set ($orderDirection = "$!{request.get('dir').toLowerCase()}") #if ("$!orderDirection" != '' && "$!orderDirection" != 'asc') #set($orderDirection = 'desc')
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-wh34-m772-5398ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-55663ghsaADVISORY
- github.com/xwiki/xwiki-platform/commit/673076e2e8b88a36cdeaf7007843aa9ca1a068a0ghsax_refsource_MISCWEB
- github.com/xwiki/xwiki-platform/security/advisories/GHSA-wh34-m772-5398ghsax_refsource_CONFIRMWEB
- jira.xwiki.org/browse/XWIKI-17568ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.