Miggo Logo

CVE-2025-32969: org.xwiki.platform:xwiki-platform-rest-server allows SQL injection in query endpoint of REST API

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.90023%
Published
4/23/2025
Updated
4/30/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.xwiki.platform:xwiki-platform-rest-servermaven>= 1.8, < 15.10.1615.10.16
org.xwiki.platform:xwiki-platform-rest-servermaven>= 16.0.0-rc-1, < 16.4.616.4.6
org.xwiki.platform:xwiki-platform-rest-servermaven>= 16.5.0-rc-1, < 16.10.116.10.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is an SQL injection in the HQL query endpoint of the XWiki REST API. The analysis focused on the provided commit 5c11a874bd24a581f534d283186e209bbccd8113.

  1. The REST API layer, specifically a method like DefaultQueryResource.getResults (inferred from the vulnerability path /rest/wikis/xwiki/query and the patch to AbstractDatabaseSearchSource.java which is in the same REST server module), is the entry point that processes the malicious 'q' parameter from the user.
  2. The core of the HQL execution logic resides in com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor. The execute method within this class is where the (potentially malicious) HQL query is run. The patch modifies the timing and context of checks within this method.
  3. The isSafeSelect method in HqlQueryExecutor was responsible for validating the HQL query. Its previous implementation was insufficient and directly contributed to the vulnerability by allowing malicious queries to pass as safe. The patch completely overhauled its validation logic. These functions would appear in a runtime profile during exploitation: the REST method receives the input, and HqlQueryExecutor.execute (which internally relies on the logic previously in isSafeSelect for validation) executes it.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t It is possi*l* *or * r*mot* un*ut**nti**t** us*r to *s**p* *rom t** *QL *x**ution *ont*xt *n* p*r*orm * *lin* SQL inj**tion to *x**ut* *r*itr*ry SQL st*t*m*nts on t** **t***s* ***k*n*, in*lu*in* w**n "Pr*v*nt unr**ist*r** us*rs *rom vi*wi

Reasoning

T** vuln*r**ility is *n SQL inj**tion in t** *QL qu*ry *n*point o* t** XWiki R*ST *PI. T** *n*lysis *o*us** on t** provi*** *ommit `****************************************`. *. T** R*ST *PI l*y*r, sp**i*i**lly * m*t*o* lik* `****ultQu*ryR*sour**.**t