7.2high
Path traversal vulnerability in Simple Archive Format package import in DSpace
- Severity
- 7.2high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 2.02% (higher than 81% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8rmh-55h4-93h5
Description
DSpace open source software is a repository application which provides durable access to digital resources. In affected versions the ItemImportServiceImpl is vulnerable to a path traversal vulnerability. This means a malicious SAF (simple archive format) package could cause a file/directory to be created anywhere the Tomcat/DSpace user can write to on the server. However, this path traversal vulnerability is only possible by a user with special privileges (either Administrators or someone with command-line access to the server). This vulnerability impacts the XMLUI, JSPUI and command-line. Users are advised to upgrade. As a basic workaround, users may block all access to the following URL paths: If you are using the XMLUI, block all access to /admin/batchimport path (this is the URL of the Admin Batch Import tool). Keep in mind, if your site uses the path "/xmlui", then you'd need to block access to /xmlui/admin/batchimport. If you are using the JSPUI, block all access to /dspace-admin/batchimport path (this is the URL of the Admin Batch Import tool). Keep in mind, if your site uses the path "/jspui", then you'd need to block access to /jspui/dspace-admin/batchimport. Keep in mind, only an Administrative user or a user with command-line access to the server is able to import/upload SAF packages. Therefore, assuming those users do not blindly upload untrusted SAF packages, then it is unlikely your site could be impacted by this vulnerability.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| DSpace DSpace | >= 6.0, < 6.4, >= 4.0, < 5.11 | CVE List |
| org.dspace:dspace-api (Maven) | from 4.0 before 5.11, from 6.0 before 6.4 | GitHub Advisory Database |
| duraspace dspace | from 4.0 up to 5.10, from >6.0 before 6.4 | NVD |
All scores
| GitHub_M | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
DSpace open source software is a repository application which provides durable access to digital resources. In affected versions the ItemImportServiceImpl is vulnerable to a path traversal vulnerability. This means a malicious SAF (simple archive format) package could cause a file/directory to be created anywhere the Tomcat/DSpace user can write to on the server. However, this path traversal vulnerability is only possible by a user with special privileges (either Administrators or someone with command-line access to the server). This vulnerability impacts the XMLUI, JSPUI and command-line. Users are advised to upgrade. As a basic workaround, users may block all access to the following URL paths: If you are using the XMLUI, block all access to /admin/batchimport path (this is the URL of the Admin Batch Import tool). Keep in mind, if your site uses the path "/xmlui", then you'd need to block access to /xmlui/admin/batchimport. If you are using the JSPUI, block all access to /dspace-admin/batchimport path (this is the URL of the Admin Batch Import tool). Keep in mind, if your site uses the path "/jspui", then you'd need to block access to /jspui/dspace-admin/batchimport. Keep in mind, only an Administrative user or a user with command-line access to the server is able to import/upload SAF packages. Therefore, assuming those users do not blindly upload untrusted SAF packages, then it is unlikely your site could be impacted by this vulnerability.
GitHub Advisory Database
Impact
ItemImportServiceImpl is vulnerable to a path traversal vulnerability. This means a malicious SAF (simple archive format) package could cause a file/directory to be created anywhere the Tomcat/DSpace user can write to on the server. However, this path traversal vulnerability is only possible by a user with special privileges (either Administrators or someone with command-line access to the server). This vulnerability impacts the XMLUI, JSPUI and command-line.
This vulnerability does NOT impact 7.x.
Patches
DSpace 6.x:
- Fixed in 6.4 via commit: https://github.com/DSpace/DSpace/commit/7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
- 6.x patch file: https://github.com/DSpace/DSpace/commit/7af52a0883a9dbc475cf3001f04ed11b24c8a4c0.patch (may be applied manually if an immediate upgrade to 6.4 or 7.x is not possible)
DSpace 5.x:
- Fixed in 5.11 via commit: https://github.com/DSpace/DSpace/commit/56e76049185bbd87c994128a9d77735ad7af0199
- 5.x patch file: https://github.com/DSpace/DSpace/commit/56e76049185bbd87c994128a9d77735ad7af0199.patch (may be applied manually if an immediate upgrade to 5.11 or 6.4 or 7.x is not possible)
Apply the patch to your DSpace
If at all possible, we recommend upgrading your DSpace site based on the upgrade instructions. However, if you are unable to do so, you can manually apply the above patches as follows:
- Download the appropriate patch file to the machine where DSpace is running
- From the
[dspace-src]folder, apply the patch, e.g.git apply [name-of-file].patch - Now, update your DSpace site (based loosely on the Upgrade instructions). This generally involves three steps:
- Rebuild DSpace, e.g.
mvn -U clean package(This will recompile all DSpace code) - Redeploy DSpace, e.g.
ant update(This will copy all updated WARs / configs to your installation directory). Depending on your setup you also may need to copy the updated WARs over to your Tomcat webapps folder. - Restart Tomcat
- Rebuild DSpace, e.g.
Workarounds
As a basic workaround, you may block all access to the following URL paths:
- If you are using the XMLUI, block all access to
/admin/batchimportpath (this is the URL of the Admin Batch Import tool). Keep in mind, if your site uses the path "/xmlui", then you'd need to block access to/xmlui/admin/batchimport. - If you are using the JSPUI, block all access to
/dspace-admin/batchimportpath (this is the URL of the Admin Batch Import tool). Keep in mind, if your site uses the path "/jspui", then you'd need to block access to/jspui/dspace-admin/batchimport.
Keep in mind, only an Administrative user or a user with command-line access to the server is able to import/upload SAF packages. Therefore, assuming those users do not blindly upload untrusted SAF packages, then it is unlikely your site could be impacted by this vulnerability.
For more information
If you have any questions or comments about this advisory:
- Email us at security@dspace.org
NVD (es)
El software de código abierto DSpace es una aplicación de repositorio que proporciona acceso duradero a los recursos digitales. En las versiones afectadas el ItemImportServiceImpl es vulnerable a una vulnerabilidad de salto de ruta. Esto significa que un paquete SAF (formato de archivo simple) malicioso podría causar la creación de un archivo/directorio en cualquier lugar donde el usuario de Tomcat/DSpace pueda escribir en el servidor. Sin embargo, esta vulnerabilidad de salto de ruta sólo es posible por un usuario con privilegios especiales (ya sea administradores o alguien con acceso a la línea de comandos del servidor). Esta vulnerabilidad afecta a XMLUI, JSPUI y a la línea de comandos. Es recomendado a usuarios actualizar. Como mitigación básica, los usuarios pueden bloquear todo el acceso a las siguientes rutas URL: Si usa la XMLUI, bloquee todos los accesos a la ruta /admin/batchimport (esta es la URL de la herramienta Admin Batch Import). Ten en cuenta que si tu sitio usa la ruta "/xmlui", tendrás que bloquear el acceso a /xmlui/admin/batchimport. Si usas la JSPUI, bloquea todo el acceso a la ruta /dspace-admin/batchimport (esta es la URL de la herramienta Admin Batch Import). Ten en cuenta que si tu sitio usa la ruta "/jspui", entonces tendrás que bloquear el acceso a /jspui/dspace-admin/batchimport. Tenga en cuenta que sólo un usuario administrativo o un usuario con acceso a la línea de comandos del servidor puede importar/cargar paquetes SAF. Por lo tanto, asumiendo que esos usuarios no suben ciegamente paquetes SAF no confiables, entonces es poco probable que su sitio pueda ser impactado por esta vulnerabilidad
References
| https://github.com/DSpace/DSpace/security/advisories/GHSA-8rmh-55h4-93h5 | patch, third-party-advisory, web | |
| https://github.com/DSpace/DSpace/commit/56e76049185bbd87c994128a9d77735ad7af0199 | patch, third-party-advisory, web | |
| https://github.com/DSpace/DSpace/commit/7af52a0883a9dbc475cf3001f04ed11b24c8a4c0 | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-31195 | advisory | |
| https://github.com/DSpace/DSpace | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-31195 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8rmh-55h4-93h5 changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-31195 changed 2026-06-17 | Public domain |