Summary
XWiki Platform: HQL injection in search allows unauthenticated database extraction including password hashes
Advisory 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
- https://github.com/advisories/GHSA-jmmc-wjpc-pg34
- https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-jmmc-wjpc-pg34
- https://nvd.nist.gov/vuln/detail/CVE-2026-61689
- https://github.com/xwiki/xwiki-platform/commit/4d6a2cd9cd049d0c31823ce47bff0a95667967e3
- https://github.com/xwiki/xwiki-platform/commit/62b034daceead8e292244d6c9e651c0ee8b1354c
- https://github.com/xwiki/xwiki-platform/commit/ae540bc3def0d4a30210eb9bead4e559984b4462
- https://github.com/xwiki/xwiki-platform/commit/b63d383f2e2a41826c21a76d678b9b0e1ab0ce52
- https://github.com/xwiki/xwiki-platform/releases/tag/xwiki-platform-16.10.18
Related vulnerabilities
All Supply chain →- HIGHCVE-2026-125119
Mongoose: Connection-level sanitizeFilter not applied
- CRITICALCVE-2026-125120
Mongoose: sanitizeFilter not applied on countDocuments
- MEDIUMGHSA-jf75-q64q-g65r
Waline login accepts a non-string email as a match-all MongoDB query
- HIGHCVE-2026-114510
Flexible GraphRAG: Cypher/Graph Injection via broken string-escaping in FalkorDB adapter (_escape()) - full graph wipe from ingested-document content
- MEDIUMCVE-2026-103288
Ghost: Authorization Bypass in Comment Like Feature
- MEDIUMCVE-2026-113662
ApostropheCMS import-export: NoSQL injection via update-key value lets a crafted import match and overwrite an unidentified document