CVE-2023-45135: Xwiki platform web templates XWiki Users Can Be Tricked Vulnerability
CRITICALCVE-2023-45135 is a CRITICAL (CVSS 9.0) xwiki users can be tricked vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Xwiki platform web templates libraries in the Maven ecosystem. The issue involves xwiki users can be tricked to execute scripts as the create page action doesn't display the page's title. Remediation is available by upgrading affected packages to version 14.10.12, 15.5-rc-1.
CVE-2023-45135 at a Glance
Security Impact
CVSS: 9.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H).
How to Fix CVE-2023-45135
To remediate this vulnerability, upgrade all affected Xwiki platform web templates 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-web-templates</artifactId>
<version>14.10.12</version>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-web-templates</artifactId>
<version>15.5-rc-1</version>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-web</artifactId>
<version>14.10.12</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-2023-45135, 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 web templates in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.10.12), 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-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Xwiki platform web templates, 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-2023-45135 Affected Xwiki platform web templates Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.xwiki.platform:xwiki-platform-web-templates
|
Maven |
< 14.10.12
|
14.10.12
|
|
org.xwiki.platform:xwiki-platform-web-templates
|
Maven |
≥ 15.0-rc-1
< 15.5-rc-1
|
15.5-rc-1
|
|
org.xwiki.platform:xwiki-platform-web
|
Maven |
≥ 7.2-milestone-2
< 14.10.12
|
14.10.12
|
References
Frequently Asked Questions
What is CVE-2023-45135?
Which Xwiki platform web templates versions are affected?
What version fixes CVE-2023-45135?
Is xwiki-platform-web-templates affected?
Is xwiki-platform-web affected?
What is the CVSS score of CVE-2023-45135?
What CWE is associated with CVE-2023-45135?
How can I check Maven dependencies for CVE-2023-45135?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-ghf6-2f42-mjh9",
"modified" : "2023-10-27T21:01:12Z",
"published" : "2023-10-25T21:13:10Z",
"aliases" : [ "CVE-2023-45135" ],
"summary" : "XWiki users can be tricked to execute scripts as the create page action doesn't display the page's title",
"details" : "### Impact\nIn XWiki, it is possible to pass a title to the page creation action that isn't displayed at first but then executed in the second step. This can be used by an attacker to trick a victim to execute code, allowing script execution if the victim has script right or remote code execution including full access to the XWiki instance if the victim has programming right.\n\nFor the attack to work, the attacker needs to convince the victim to visit a link like `<xwiki-host>/xwiki/bin/create/NonExistingSpace/WebHome?title=$services.logging.getLogger(%22foo%22).error(%22Script%20executed!%22)` where `<xwiki-host>` is the URL of the Wiki installation and to then click on the \"Create\" button on that page. The page looks like a regular XWiki page that the victim would also see when clicking the button to create a page that doesn't exist yet, the malicious code is not displayed anywhere on that page. After clicking the \"Create\" button, the malicious title would be displayed but at this point, the code has already been executed and the attacker could use this code also to hide the attack, e.g., by redirecting the victim again to the same page with an innocent title. It thus seems plausible that this attack could work if the attacker can place a fake \"create page\" button on a page which is possible with edit right.\n\n### Patches\nThis has been patched in XWiki 14.10.2 and 15.5RC1 by displaying the title already in the first step such that the victim can notice the attack before continuing.\n\n### Workarounds\nIt is possible to manually patch the modified files from the [patch](https://github.com/xwiki/xwiki-platform/commit/199e27ce7016757e66fa7cea99e718044a1b639b) in an existing installation. For the JavaScript change, the minified JavaScript file would need to be obtained from a build of XWiki and replaced accordingly. ",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-web-templates"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "14.10.12"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-web-templates"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0-rc-1"
}, {
"fixed" : "15.5-rc-1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-web"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.2-milestone-2"
}, {
"fixed" : "14.10.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-ghf6-2f42-mjh9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-45135"
}, {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/commit/199e27ce7016757e66fa7cea99e718044a1b639b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/xwiki/xwiki-platform"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XWIKI-20869"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-116" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-10-25T21:13:10Z",
"nvd_published_at" : "2023-10-25T20:15:11Z"
}
}