CVE-2023-37913: Xwiki platform office importer Xwiki-platform-office-importer Vulnerable To Arbitrary Server Vulnerability
CRITICALCVE-2023-37913 is a CRITICAL (CVSS 9.9) xwiki-platform-office-importer vulnerable to arbitrary server vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Xwiki platform office importer libraries in the Maven ecosystem. The issue involves xwiki-platform-office-importer vulnerable to arbitrary server side file writing from account through office converter. Remediation is available by upgrading affected packages to version 14.10.8, 15.3-rc-1.
CVE-2023-37913 at a Glance
Security Impact
CVSS: 9.9
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:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2023-37913
To remediate this vulnerability, upgrade all affected Xwiki platform office importer 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-office-importer</artifactId>
<version>14.10.8</version>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-office-importer</artifactId>
<version>15.3-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-2023-37913, 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 office importer in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.10.8), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Xwiki platform office importer, 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-37913 Affected Xwiki platform office importer Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.xwiki.platform:xwiki-platform-office-importer
|
Maven |
≥ 3.5-milestone-1
< 14.10.8
|
14.10.8
|
|
org.xwiki.platform:xwiki-platform-office-importer
|
Maven |
≥ 15.0-rc-1
< 15.3-rc-1
|
15.3-rc-1
|
References
Frequently Asked Questions
What is CVE-2023-37913?
Which Xwiki platform office importer versions are affected?
What version fixes CVE-2023-37913?
Is xwiki-platform-office-importer affected?
What is the CVSS score of CVE-2023-37913?
What CWE is associated with CVE-2023-37913?
How can I check Maven dependencies for CVE-2023-37913?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vcvr-v426-3m3m",
"modified" : "2023-10-25T21:08:32Z",
"published" : "2023-10-25T21:08:32Z",
"aliases" : [ "CVE-2023-37913" ],
"summary" : "org.xwiki.platform:xwiki-platform-office-importer vulnerable to arbitrary server side file writing from account through office converter",
"details" : "### Impact\n\nTriggering the office converter with a specially crafted file name allows writing the attachment's content to an attacker-controlled location on the server as long as the Java process has write access to that location. In particular in the combination with attachment moving, a feature introduced in XWiki 14.0, this is easy to reproduce but it also possible to reproduce in versions as old as XWiki 3.5 by uploading the attachment through the REST API which doesn't remove `/` or `\\` from the filename. As the mime type of the attachment doesn't matter for the exploitation, this could e.g., be used to replace the `jar`-file of an extension which would allow executing arbitrary Java code and thus impact the confidentiality, integrity and availability of the XWiki installation. To reproduce the issue on versions since XWiki 14.0, execute the following steps:\n\n1. Activate the office server\n2. Upload an arbitrary file with the extension .doc, e.g., to your user profile (you can use a regular plain text file, only the extension matters).\n3. Use the attachment move feature to rename the file to ../../../../../tmp/Hello from XWiki.txt where the latter part is the location of a file you want to write on the server. The number of ../ depends on the directory depth, the provided example should work on Linux with the demo distribution.\n4. Click the \"preview\" link to trigger the office converter\n\nFor information how to reproduce on older versions, see the [Jira issue](https://jira.xwiki.org/browse/XWIKI-20715).\n\nTo the best of our knowledge, this attack is not possible when the office conversion process doesn't run as the code fails before the file is written.\n\n### Patches\n\nThis vulnerability has been patched in XWiki 14.10.8 and 15.3RC1.\n\n### Workarounds\n\nThere are no known workarounds apart from disabling the office converter.\n\n### References\n\n* https://jira.xwiki.org/browse/XWIKI-20715\n* https://github.com/xwiki/xwiki-platform/commit/45d182a4141ff22f3ff289cf71e4669bdc714544",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-office-importer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.5-milestone-1"
}, {
"fixed" : "14.10.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.xwiki.platform:xwiki-platform-office-importer"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "15.0-rc-1"
}, {
"fixed" : "15.3-rc-1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-vcvr-v426-3m3m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37913"
}, {
"type" : "WEB",
"url" : "https://github.com/xwiki/xwiki-platform/commit/45d182a4141ff22f3ff289cf71e4669bdc714544"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/xwiki/xwiki-platform"
}, {
"type" : "WEB",
"url" : "https://jira.xwiki.org/browse/XWIKI-20715"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2023-10-25T21:08:32Z",
"nvd_published_at" : "2023-10-25T18:17:28Z"
}
}