CVE-2025-52472
published 2025-10-06CVE-2025-52472: XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Starting in version 4.3-milestone-1 and prior to…
PriorityP181critical9.3CVSS 4.0
AVNACLATNPRNUINVCHVIHVAHSCNSINSANEXCRXIRXARXMAVXMACXMATXMPRXMUIXMVCXMVIXMVAXMSCXMSIXMSAXSXAUXRXVXREXUX
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
2.24%
80.6th percentile
XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Starting in version 4.3-milestone-1 and prior to versions 16.10.9, 17.4.2, and 17.5.0, the REST search URL is vulnerable to HQL injection via the `orderField` parameter. The specified value is added twice in the query, though, once in the field list for the select and once in the order clause, so it's not that easy to exploit. The part of the query between the two fields can be enclosed in single quotes to effectively remove them, but the query still needs to remain valid with the query two times in it. This has been patched in versions 17.5.0, 17.4.2, and 16.10.9. No known workarounds are available.
Affected
2 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| xwiki | xwiki-platform | — | — |
| xwiki | xwiki-platform | — | — |
Detection & IOCsextracted from sources · hover to see the quote
url/xwiki/rest/wikis/xwiki/search?q=test&scope=title&orderField=doc.fullName%20from%20XWikiDocument%20as%20doc%20where%20%24%24%3D%27%24%24%3Dconcat(chr(61)%2Cchr(39))%20and%20version()%7C%7Cpg_sleep(1)%3Dversion()%7C%7Cpg_sleep(1)%20and%20(1%3D1%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20%3F%3D%3F)%20--%20comment%27%20or%20a%3D%27%20order%20by%20doc.fullName↗
- →HTTP 500 response containing both 'xwiki' and 'QueryException: Exception while executing query. Query statement' in the body with content-type text/plain indicates successful HQL injection trigger via the orderField parameter. ↗
- →Shodan/FOFA fingerprint for exposed XWiki instances: search for html attribute 'data-xwiki-reference' in page body. ↗
- ·The HQL injection payload is complex to exploit because the injected orderField value is inserted twice into the query (once in the SELECT field list and once in the ORDER BY clause); a valid injection must keep the overall query syntactically correct in both positions. ↗
- ·The proof-of-concept payload uses PostgreSQL-specific functions (pg_sleep, version(), concat, chr); exploitation and time-based detection may differ or fail against non-PostgreSQL database backends. ↗
- ·The vulnerability is exploitable without authentication (PR:N, UI:N per CVSS), meaning no session or credentials are required to send the malicious orderField payload. ↗
CVSS provenance
nvdv4.09.3CRITICALCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
vulncheck9.3CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
XWiki Platform is vulnerable to HQL injection via wiki and space search REST API
osv·2025-10-06
CVE-2025-52472 [CRITICAL] XWiki Platform is vulnerable to HQL injection via wiki and space search REST API
XWiki Platform is vulnerable to HQL injection via wiki and space search REST API
### Impact
The REST search URL is vulnerable to HQL injection via the `orderField` parameter. The specified value is added twice in the query, though, once in the field list for the select and once in the order clause, so it's not that easy to exploit. The part of the query between the two fields can be enclosed in single quotes to effectively remove them, but the query still needs to remain valid with the query two times in it.
For example, with the following `orderField` parameter:
```
doc.fullName%20from%20XWikiDocument%20as%20doc%20where%20%24%24%3D'%24%24%3Dconcat(chr(61)%2Cchr(39))%20and%20version()%7C%7Cpg_sleep(1)%3Dversion()%7C%7Cpg_sleep(1)%20and%20(1%3D1%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20
GHSA
XWiki Platform is vulnerable to HQL injection via wiki and space search REST API
ghsa·2025-10-06
CVE-2025-52472 [CRITICAL] CWE-89 XWiki Platform is vulnerable to HQL injection via wiki and space search REST API
XWiki Platform is vulnerable to HQL injection via wiki and space search REST API
### Impact
The REST search URL is vulnerable to HQL injection via the `orderField` parameter. The specified value is added twice in the query, though, once in the field list for the select and once in the order clause, so it's not that easy to exploit. The part of the query between the two fields can be enclosed in single quotes to effectively remove them, but the query still needs to remain valid with the query two times in it.
For example, with the following `orderField` parameter:
```
doc.fullName%20from%20XWikiDocument%20as%20doc%20where%20%24%24%3D'%24%24%3Dconcat(chr(61)%2Cchr(39))%20and%20version()%7C%7Cpg_sleep(1)%3Dversion()%7C%7Cpg_sleep(1)%20and%20(1%3D1%20or%20%3F%3D%3F%20or%20%3F%3D%3F%20or%20
VulnCheck
xwiki xwiki Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
vulncheck·2025·CVSS 9.3
CVE-2025-52472 [CRITICAL] xwiki xwiki Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
xwiki xwiki Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Starting in version 4.3-milestone-1 and prior to versions 16.10.9, 17.4.2, and 17.5.0, the REST search URL is vulnerable to HQL injection via the `orderField` parameter. The specified value is added twice in the query, though, once in the field list for the select and once in the order clause, so it's not that easy to exploit. The part of the query between the two fields can be enclosed in single quotes to effectively remove them, but the query still needs to remain valid with the query two times in it. This has been patched in versions 17.5.0, 17.4.2, and 16.10.9. No known workarounds are
No detection rules found.
Nuclei
XWiki - HQL Injection
nuclei·CVSS 9.3
CVE-2025-52472 [CRITICAL] XWiki - HQL Injection
XWiki - HQL Injection
XWiki is vulnerable to Hibernate Query Language (HQL) injection in the wiki and space search REST API starting in version 4.3-milestone-1 and prior to versions 16.10.9, 17.4.2, and 17.5.0. The vulnerability allows attackers to inject malicious HQL queries through the orderField parameter, potentially leading to data extraction, authentication bypass, or remote code execution depending on database backend and configuration.
Template:
id: CVE-2025-52472
info:
name: XWiki - HQL Injection
author: ritikchaddha
severity: high
description: |
XWiki is vulnerable to Hibernate Query Language (HQL) injection in the wiki and space search REST API starting in version 4.3-milestone-1 and prior to versions 16.10.9, 17.4.2, and 17.5.0. The vulnerability allows attackers to inject
No writeups or analysis indexed.
2025-10-06
Published
Exploited in the wild