CVE-2026-61689
XWiki Platform: HQL injection in search allows unauthenticated database extraction including password hashes
Description
Impact
The query REST API allows executing HQL queries to filter the listed pages. While this properly checks access rights for the current user, the query can be used to combine when clauses and blind queries, to recover values, through FROM clause injection to join BaseObject and StringProperty tables, bypassing the HQL validator's SELECT column whitelist. This allows recovering any data that is stored in the database, including data from inaccessible pages, password hashes and passwords stored in configuration properties. For a typical password hash, this requires about 800 requests to the REST API (about one per bit). It should be assumed that when using more complex techniques, this even works when the attacker cannot read any wiki page. Password hashes use salted SHA1 in XWiki which can be cracked offline for weak passwords. Further, the executed database queries could be slow, affecting the availability of the system.
Patches
The vulnerability has been fixed in XWiki 16.10.18, 17.10.5 and 18.2.0 by disabling the HQL and WXQL queries in the REST API by default.
Workarounds
The requests to the /rest/wikis/{wikiName}/query endpoint could be blocked at the web server/reverse proxy level.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.xwiki.platform » xwiki-platform-rest-server | >= 4.3-milestone-1, < 16.10.18>= 17.0.0-rc-1, < 17.10.5>= 18.0.0-rc-1, < 18.2.0 | 16.10.18, 17.10.5, 18.2.0 |
Blast radius
59% of the dependent artifacts (175) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 7,071 |
| 2 hops | 6,879 |
| 3 hops | 7,299 |
| 4 hops | 4,686 |
| 5 hops | 5,709 |
| 6 hops | 361 |
Most used dependents
- org.xwiki.platform » xwiki-platform-test-docker101 usages
- org.xwiki.platform » xwiki-platform-tool-packager-plugin77 usages
- org.xwiki.platform » xwiki-platform-panels-ui62 usages
- org.xwiki.platform » xwiki-platform-appwithinminutes-ui31 usages
- org.xwiki.platform » xwiki-platform-livedata-macro26 usages
- org.xwiki.platform » xwiki-platform-wiki-creationjob23 usages
- org.xwiki.platform » xwiki-platform-mail-ui19 usages
- org.xwiki.platform » xwiki-platform-index-ui16 usages
- org.xwiki.platform » xwiki-platform-user-profile-ui14 usages
- org.xwiki.enterprise » xwiki-enterprise-web14 usages
- org.xwiki.platform » xwiki-platform-notifications-ui13 usages
- org.xwiki.platform » xwiki-platform-localization-rest-default13 usages
- org.xwiki.platform » xwiki-platform-xclass-ui13 usages
- org.phenotips » phenotips-rest-commons13 usages
- org.xwiki.platform » xwiki-platform-extension-distribution13 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/xwiki/xwiki-platform/security/advisories/GHSA-jmmc-wjpc-pg34
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-61689
- Webhttps://github.com/xwiki/xwiki-platform/commit/4d6a2cd9cd049d0c31823ce47bff0a95667967e3
- Webhttps://github.com/xwiki/xwiki-platform/commit/62b034daceead8e292244d6c9e651c0ee8b1354c
- Webhttps://github.com/xwiki/xwiki-platform/commit/ae540bc3def0d4a30210eb9bead4e559984b4462
- Webhttps://github.com/xwiki/xwiki-platform/commit/b63d383f2e2a41826c21a76d678b9b0e1ab0ce52
- Packagehttps://github.com/xwiki/xwiki-platform
- Webhttps://github.com/xwiki/xwiki-platform/releases/tag/xwiki-platform-16.10.18
- Webhttps://github.com/xwiki/xwiki-platform/releases/tag/xwiki-platform-17.10.5
- Webhttps://github.com/xwiki/xwiki-platform/releases/tag/xwiki-platform-18.2.0
- Webhttps://jira.xwiki.org/browse/XWIKI-24061
