CVE-2025-54385: Xwiki platform oldcore SQL Injection Vulnerability
HIGHCVE-2025-54385 is a HIGH sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Xwiki platform oldcore libraries in the Maven ecosystem. The issue involves xwiki platform vulnerable to sql injection through xwiki#searchdocuments api. Remediation is available by upgrading affected packages to version 16.10.6, 17.3.0-rc-1.
CVE-2025-54385 at a Glance
How to Fix CVE-2025-54385
To remediate this vulnerability, upgrade all affected Xwiki platform oldcore dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-oldcore</artifactId>
<version>16.10.6</version>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-oldcore</artifactId>
<version>17.3.0-rc-1</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.xwiki.platform
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2025-54385, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.xwiki.platform
Analyze the terminal output to locate any version of Xwiki platform oldcore in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 16.10.6), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.xwiki.platform command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Xwiki platform oldcore, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-54385 Affected Xwiki platform oldcore Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.xwiki.platform:xwiki-platform-oldcore
|
Maven |
≥ 1.0
< 16.10.6
|
16.10.6
|
|
org.xwiki.platform:xwiki-platform-oldcore
|
Maven |
≥ 17.0.0-rc1
< 17.3.0-rc-1
|
17.3.0-rc-1
|
References
Frequently Asked Questions
What is CVE-2025-54385?
Which Xwiki platform oldcore versions are affected?
What version fixes CVE-2025-54385?
Is xwiki-platform-oldcore affected?
What CWE is associated with CVE-2025-54385?
How can I check Maven dependencies for CVE-2025-54385?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-p9qm-p942-q3w5",
"modified" : "2025-07-28T13:04:55Z",
"published" : "2025-07-25T14:11:00Z",
"aliases" : [ "CVE-2025-54385" ],
"summary" : "XWiki Platform vulnerable to SQL injection through XWiki#searchDocuments API",
"details" : "### Impact\n\nIt's possible to execute any SQL query in Oracle by using the function like [DBMS_XMLGEN or DBMS_XMLQUERY](https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_XMLGEN.html).\n\nThe XWiki#searchDocuments APIs are not sanitizing the query at all and even if they force a specific select, Hibernate allows using any native function in an HQL query (for example in the WHERE).\n\n### Patches\n\nThis has been patched in 16.10.6 and 17.3.0-rc-1.\n\n### Workarounds\n\nThere is no known workaround, other than upgrading XWiki.\n\n### References\n\nhttps://jira.xwiki.org/browse/XWIKI-22728\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Jira XWiki.org](https://jira.xwiki.org/)\n* Email us at [Security Mailing List](mailto:security@xwiki.org)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-oldcore"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0"
}, {
"fixed" : "16.10.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-oldcore"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "17.0.0-rc1"
}, {
"fixed" : "17.3.0-rc-1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-p9qm-p942-q3w5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54385"
}, {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/commit/7313dc9b533c70f14b7672379c8b3b63d1fd8f51"
}, {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/commit/7c4087d44ac550610b2fa413dd4f5375409265a5"
}, {
"type" : "WEB",
"url" : "https://docs.oracle.com/en/database/oracle/oracle-database/19/arpls/DBMS_XMLGEN.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/xwiki/xwiki-platform"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XWIKI-22728"
}, {
"type" : "WEB",
"url" : "https://www.xwiki.org/xwiki/bin/view/ReleaseNotes/Data/XWiki/16.10.6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-89" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-07-25T14:11:00Z",
"nvd_published_at" : "2025-07-26T04:16:06Z"
}
}