CVE-2026-61689: XWiki Platform: HQL injection in search allows unauthenticated database extraction including password hashes
High
- OSV id
- GHSA-jmmc-wjpc-pg34
- Also known as
- CVE-2026-61689
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| org.xwiki.platform:xwiki-platform-rest-server Maven |
>= 4.3-milestone-1, < 16.10.18 | 16.10.18 |
| org.xwiki.platform:xwiki-platform-rest-server Maven |
>= 18.0.0-rc-1, < 18.2.0 | 18.2.0 |
| org.xwiki.platform:xwiki-platform-rest-server Maven |
>= 17.0.0-rc-1, < 17.10.5 | 17.10.5 |
How to fix it
org.xwiki.platform:xwiki-platform-rest-server (Maven)
Upgrade org.xwiki.platform:xwiki-platform-rest-server to 16.10.18 or later.
# in pom.xml: set the <version> of org.xwiki.platform:xwiki-platform-rest-server (or the property that holds it) to 16.10.18
mvn versions:use-dep-version -Dincludes=org.xwiki.platform:xwiki-platform-rest-server -DdepVersion=16.10.18 -DforceVersion=true
# if it is an indirect dependency, pin it in <dependencyManagement>, then: mvn dependency:tree
- If it is an indirect dependency, pin it in <dependencyManagement> (Maven) or with a dependency constraint (Gradle), or upgrade the library that brings it in; `mvn dependency:tree` / `./gradlew dependencies` show which one.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
org.xwiki.platform:xwiki-platform-rest-server (Maven)
Upgrade org.xwiki.platform:xwiki-platform-rest-server to 18.2.0 or later.
# in pom.xml: set the <version> of org.xwiki.platform:xwiki-platform-rest-server (or the property that holds it) to 18.2.0
mvn versions:use-dep-version -Dincludes=org.xwiki.platform:xwiki-platform-rest-server -DdepVersion=18.2.0 -DforceVersion=true
# if it is an indirect dependency, pin it in <dependencyManagement>, then: mvn dependency:tree
- If it is an indirect dependency, pin it in <dependencyManagement> (Maven) or with a dependency constraint (Gradle), or upgrade the library that brings it in; `mvn dependency:tree` / `./gradlew dependencies` show which one.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
org.xwiki.platform:xwiki-platform-rest-server (Maven)
Upgrade org.xwiki.platform:xwiki-platform-rest-server to 17.10.5 or later.
# in pom.xml: set the <version> of org.xwiki.platform:xwiki-platform-rest-server (or the property that holds it) to 17.10.5
mvn versions:use-dep-version -Dincludes=org.xwiki.platform:xwiki-platform-rest-server -DdepVersion=17.10.5 -DforceVersion=true
# if it is an indirect dependency, pin it in <dependencyManagement>, then: mvn dependency:tree
- If it is an indirect dependency, pin it in <dependencyManagement> (Maven) or with a dependency constraint (Gradle), or upgrade the library that brings it in; `mvn dependency:tree` / `./gradlew dependencies` show which one.
- Check the changelog for breaking changes (especially across major versions), update the lockfile with the package manager, and run your tests.
Not sure whether your project uses an affected version? Check your lockfile below for free.
Details
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.
References
- GHSA-jmmc-wjpc-pg34 on OSV.dev
- Web: https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-jmmc-wjpc-pg34
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-61689
- Web: https://github.com/xwiki/xwiki-platform/commit/4d6a2cd9cd049d0c31823ce47bff0a95667967e3
- Web: https://github.com/xwiki/xwiki-platform/commit/62b034daceead8e292244d6c9e651c0ee8b1354c
- Web: https://github.com/xwiki/xwiki-platform/commit/ae540bc3def0d4a30210eb9bead4e559984b4462
- Web: https://github.com/xwiki/xwiki-platform/commit/b63d383f2e2a41826c21a76d678b9b0e1ab0ce52
- Package: https://github.com/xwiki/xwiki-platform
- Web: https://github.com/xwiki/xwiki-platform/releases/tag/xwiki-platform-16.10.18
- Web: https://github.com/xwiki/xwiki-platform/releases/tag/xwiki-platform-17.10.5
- Web: https://github.com/xwiki/xwiki-platform/releases/tag/xwiki-platform-18.2.0
- Web: https://jira.xwiki.org/browse/XWIKI-24061
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: GitHub Advisory Database via OSV.dev (CC-BY 4.0). Severity comes from the advisory's own rating when it has one, else from its CVSS score.