CVE-2025-32968: Xwiki platform oldcore SQL Injection Vulnerability

HIGH
Advisory Identifier: GHSA-g9jj-75mx-wjcx
CWE-89
Published
Advisory Summary

CVE-2025-32968 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-oldcore allows sql injection in short form select requests through the script query api. Remediation is available by upgrading affected packages to version 15.10.16, 16.4.6, 16.10.1.

CVE-2025-32968 at a Glance

CVE Identifier CVE-2025-32968
GHSA Identifier GHSA-g9jj-75mx-wjcx
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Xwiki platform oldcore
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2025-32968

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.

org.xwiki.platform:xwiki-platform-oldcore fixed: 15.10.16
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-oldcore</artifactId>
    <version>15.10.16</version>
</dependency>
org.xwiki.platform:xwiki-platform-oldcore fixed: 16.4.6
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-oldcore</artifactId>
    <version>16.4.6</version>
</dependency>
org.xwiki.platform:xwiki-platform-oldcore fixed: 16.10.1
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-oldcore</artifactId>
    <version>16.10.1</version>
</dependency>
Verify Direct and Transitive Dependencies

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-32968, 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 15.10.16), 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

### Impact It is possible for a user with SCRIPT right to escape from the HQL execution context and perform a blind SQL injection to execute arbitrary SQL statements on the database backend. Depending on the used database backend, the attacker may be able to not only obtain confidential information such as password hashes from the database, but also execute UPDATE/INSERT/DELETE queries. The vulnerability may be tested in a default installation of XWIki Standard Flavor, including using the official Docker containers. For example, with a MySQL or MariaDB database, you can use the following script (which a user having SCRIPT right but not PROGRAMMING right) to get the content of the xwikistrings table (which contain all the short string fields stored in objects, including passwords): ``` {{velocity}} $services.query.hql("where 1<>'1\'' union select concat(XWS_NAME, XWS_VALUE) from xwikistrings #'").execute() {{/velocity}} ``` ### Patches This has been patched in 16.10.1, 16.4.6 and 15.10.16. ### Workarounds There is no known workaround, other than upgrading XWiki. The protection added to this REST API is the same as the one used to validate complete select queries, making it more consistent. However, while the script API always had this protection for complete queries, it's important to note that it's a very strict protection and some valid, but complex, queries might suddenly require the author to have programming right. ### References https://jira.xwiki.org/browse/XWIKI-22718 ### For more information If you have any questions or comments about this advisory: * Open an issue in [Jira XWiki.org](https://jira.xwiki.org/) * Email us at [Security Mailing List](mailto:security@xwiki.org)

CVE-2025-32968 Affected Xwiki platform oldcore Versions

3 component(s)
Fixed Versions:
15.10.1616.4.616.10.1
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.platform:xwiki-platform-oldcore
Maven
≥ 1.6-milestone-1
< 15.10.16
15.10.16
org.xwiki.platform:xwiki-platform-oldcore
Maven
≥ 16.0.0-rc-1
< 16.4.6
16.4.6
org.xwiki.platform:xwiki-platform-oldcore
Maven
≥ 16.5.0-rc-1
< 16.10.1
16.10.1

References

Frequently Asked Questions

What is CVE-2025-32968?
CVE-2025-32968 is a security vulnerability in Xwiki platform oldcore involving xwiki-platform-oldcore allows SQL injection in short form select requests through the script query API under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Xwiki platform oldcore versions are affected?
Affected versions include releases prior to 15.10.16, 16.4.6, 16.10.1 across affected packages: org.xwiki.platform:xwiki-platform-oldcore.
What version fixes CVE-2025-32968?
Upgrading to 15.10.16, 16.4.6, 16.10.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-platform-oldcore affected?
Yes, org.xwiki.platform:xwiki-platform-oldcore is affected in releases prior to 15.10.16, 16.4.6, 16.10.1. Upgrade your dependency to 15.10.16, 16.4.6, 16.10.1 or later.
What CWE is associated with CVE-2025-32968?
CVE-2025-32968 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (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.).
How can I check Maven dependencies for CVE-2025-32968?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.xwiki.platform'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g9jj-75mx-wjcx",
  "modified" : "2025-04-23T19:15:49Z",
  "published" : "2025-04-23T14:41:54Z",
  "aliases" : [ "CVE-2025-32968" ],
  "summary" : "org.xwiki.platform:xwiki-platform-oldcore allows SQL injection in short form select requests through the script query API",
  "details" : "### Impact\n\nIt is possible for a user with SCRIPT right to escape from the HQL execution context and perform a blind SQL injection to execute arbitrary SQL statements on the database backend.\n\nDepending on the used database backend, the attacker may be able to not only obtain confidential information such as password hashes from the database, but also execute UPDATE/INSERT/DELETE queries.\n\nThe vulnerability may be tested in a default installation of XWIki Standard Flavor, including using the official Docker containers.\n\nFor example, with a MySQL or MariaDB database, you can use the following script (which a user having SCRIPT right but not PROGRAMMING right) to get the content of the xwikistrings table (which contain all the short string fields stored in objects, including passwords):\n\n```\n{{velocity}}\n$services.query.hql(\"where 1<>'1\\'' union select concat(XWS_NAME, XWS_VALUE) from xwikistrings #'\").execute()\n{{/velocity}}\n```\n\n### Patches\n\nThis has been patched in 16.10.1, 16.4.6 and 15.10.16.\n\n### Workarounds\n\nThere is no known workaround, other than upgrading XWiki.\n\nThe protection added to this REST API is the same as the one used to validate complete select queries, making it more consistent. However, while the script API always had this protection for complete queries, it's important to note that it's a very strict protection and some valid, but complex, queries might suddenly require the author to have programming right.\n\n### References\n\nhttps://jira.xwiki.org/browse/XWIKI-22718\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.6-milestone-1"
      }, {
        "fixed" : "15.10.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-oldcore"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.0.0-rc-1"
      }, {
        "fixed" : "16.4.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-oldcore"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "16.5.0-rc-1"
      }, {
        "fixed" : "16.10.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-g9jj-75mx-wjcx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-32968"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki/xwiki-platform"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XWIKI-22718"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-04-23T14:41:54Z",
    "nvd_published_at" : "2025-04-23T16:15:47Z"
  }
}