VYPR
High severityNVD Advisory· Published Dec 12, 2024· Updated Dec 16, 2024

XWiki Platform has an SQL injection in getdocuments.vm with sort parameter

CVE-2024-55663

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.

PackageAffected versionsPatched versions
org.xwiki.platform:xwiki-platform-distribution-warMaven
>= 6.3-milestone-2, < 13.10.513.10.5
org.xwiki.platform:xwiki-platform-distribution-warMaven
>= 14.0-rc-1, < 14.3-rc-114.3-rc-1

Affected products

1

Patches

1
673076e2e8b8

XWIKI-17568: clean sort parameter value

https://github.com/xwiki/xwiki-platformClemens Klein-RobbenhaarMar 31, 2022via ghsa
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

News mentions

0

No linked articles in our index yet.