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

PackageAffected versionsFixed 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

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.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

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.