5.2medium
DSpace has path traversal vulnerability in Simple Archive Format (SAF) package import via contents file
- Severity
- 5.2medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.80% (higher than 53% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-vhvx-8xgc-99wf
Description
DSpace open source software is a repository application which provides durable access to digital resources. Prior to versions 7.6.4, 8.2, and 9.1, a path traversal vulnerability is possible during the import of an archive (in Simple Archive Format), either from command-line (`./dspace import` command) or from the "Batch Import (Zip)" user interface feature. An attacker may craft a malicious Simple Archive Format (SAF) package where the `contents` file references any system files (using relative traversal sequences) which are readable by the Tomcat user. If such a package is imported, this will result in sensitive content disclose, including retrieving arbitrary files or configurations from the server where DSpace is running. The Simple Archive Format (SAF) importer / Batch Import (Zip) is only usable by site administrators (from user interface / REST API) or system administrators (from command-line). Therefore, to exploit this vulnerability, the malicious payload would have to be provided by an attacker and trusted by an administrator (who would trigger the import). The fix is included in DSpace 7.6.4, 8.2 and 9.1. For those who cannot upgrade immediately, it is possible to manually patch the DSpace backend. (No changes are necessary to the frontend.) A pull request exists which can be used to patch systems running DSpace 7.6.x, 8.x or 9.0. Although it is not possible to fully protect the system via workarounds, one may can apply a best practice. Administrators must carefully inspect any SAF archives (they did not construct themselves) before importing, paying close attention to the `contents` file to validate it does not reference files outside of the SAF archives.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| DSpace DSpace | < 7.6.4, >= 8.0, < 8.2, >= 9.0, < 9.1 | CVE List |
| org.dspace:dspace-api (Maven) | before 7.6.4, from 8.0 before 8.2, from 9.0 before 9.1 | GitHub Advisory Database |
All scores
| GitHub_M | 5.2medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:L |
| GitHub | 5.2medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
DSpace open source software is a repository application which provides durable access to digital resources. Prior to versions 7.6.4, 8.2, and 9.1, a path traversal vulnerability is possible during the import of an archive (in Simple Archive Format), either from command-line (`./dspace import` command) or from the "Batch Import (Zip)" user interface feature. An attacker may craft a malicious Simple Archive Format (SAF) package where the `contents` file references any system files (using relative traversal sequences) which are readable by the Tomcat user. If such a package is imported, this will result in sensitive content disclose, including retrieving arbitrary files or configurations from the server where DSpace is running. The Simple Archive Format (SAF) importer / Batch Import (Zip) is only usable by site administrators (from user interface / REST API) or system administrators (from command-line). Therefore, to exploit this vulnerability, the malicious payload would have to be provided by an attacker and trusted by an administrator (who would trigger the import). The fix is included in DSpace 7.6.4, 8.2 and 9.1. For those who cannot upgrade immediately, it is possible to manually patch the DSpace backend. (No changes are necessary to the frontend.) A pull request exists which can be used to patch systems running DSpace 7.6.x, 8.x or 9.0. Although it is not possible to fully protect the system via workarounds, one may can apply a best practice. Administrators must carefully inspect any SAF archives (they did not construct themselves) before importing, paying close attention to the `contents` file to validate it does not reference files outside of the SAF archives.
GitHub Advisory Database
Impact
A path traversal vulnerability is possible during the import of an archive (in Simple Archive Format), either from command-line (./dspace import command) or from the "Batch Import (Zip)" user interface feature. This vulnerability likely impacts all versions of DSpace 1.x <= 7.6.3, 8.0 <= 8.1, and 9.0.
An attacker may craft a malicious Simple Archive Format (SAF) package where the contents file references any system files (using relative traversal sequences) which are readable by the Tomcat user. If such a package is imported, this will result in sensitive content disclose, including retrieving arbitrary files or configurations from the server where DSpace is running.
The Simple Archive Format (SAF) importer / Batch Import (Zip) is only usable by site administrators (from user interface / REST API) or system administrators (from command-line). Therefore, to exploit this vulnerability, the malicious payload would have to be provided by an attacker and trusted by an administrator (who would trigger the import).
- The most severe practical impact is a case where an attacker obtains DSpace administrator credentials and uses the Batch Import feature with a malicious SAF archive to expose sensitive local files readable by the Tomcat user.
- An attacker without administrative credentials might use some other tactic to convince an administrator to import a malicious SAF archive they have supplied.
Patches
The fix is included in DSpace 7.6.4, 8.2 and 9.1. Please upgrade to one of these versions.
If you cannot upgrade immediately, it is possible to manually patch your DSpace backend. (No changes are necessary to the frontend.) A pull request exists which can be used to patch systems running DSpace 7.6.x, 8.x or 9.0. This pull request provides validation checks of paths in the contents file of an SAF package to ensure it does not reference any files outside of the SAF package.
- Pull request for 7.x: https://github.com/DSpace/DSpace/pull/11036 (Downloadable patch file)
- Pull request for 8.x: https://github.com/DSpace/DSpace/pull/11037 (Downloadable patch file)
- Pull request for 9.0: https://github.com/DSpace/DSpace/pull/11038 (Downloadable patch file)
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 to your DSpace backend as follows:
- Download the appropriate patch file to the machine where DSpace backend 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 backend code) - Redeploy DSpace, e.g.
ant update(This will copy all newly built code to your installation directory). Depending on your setup you also may need to copy the updated "server" webapp over to your Tomcat webapps folder. - Restart Tomcat (or runnable JAR)
- Rebuild DSpace, e.g.
Workarounds
Patching the system is the recommended fix. It is not possible to fully protect your system via workarounds.
That said, until you are able to patch your system or upgrade, you can apply these best practices:
- Administrators must carefully inspect any SAF archives (they did not construct themselves) before importing, paying close attention to the
contentsfile to validate it does not reference files outside of the SAF archives. - If SAF archives are too large to manually inspect, you should avoid importing them until your site is patched.
Credits
Discovered & reported by Marcin Miłosz (@MMilosz) of PCG Academia Code fix developed by Marcin Miłosz of PCG Academia and Kim Shepherd (@kshepherd) of The Library Code
For more information
- Path Traversal Vulnerability explained
- If you have any questions or comments about this advisory, please contact 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 recursos digitales. En versiones anteriores a la 7.6.4, 8.2 y 9.1, existía una vulnerabilidad de path traversal durante la importación de un archivo (en formato de archivo simple), ya sea desde la línea de comandos (comando `./dspace import`) o desde la función de interfaz de usuario "Importación por lotes (Zip)". Un atacante podría crear un paquete malicioso en formato de archivo simple (SAF) donde el archivo `contents` haga referencia a cualquier archivo del sistema (mediante secuencias de recorrido relativas) legible para el usuario de Tomcat. Si se importa dicho paquete, se divulgará contenido sensible, incluyendo la recuperación de archivos o configuraciones arbitrarias del servidor donde se ejecuta DSpace. El importador de formato de archivo simple (SAF)/Importación por lotes (Zip) solo puede ser utilizado por administradores del sitio (desde la interfaz de usuario/API REST) o administradores del sistema (desde la línea de comandos). Por lo tanto, para explotar esta vulnerabilidad, el payload malicioso tendría que ser proporcionado por un atacante y contar con la confianza de un administrador (quien activaría la importación). La solución está incluida en DSpace 7.6.4, 8.2 y 9.1. Quienes no puedan actualizar inmediatamente, pueden aplicar un parche manualmente al backend de DSpace (no es necesario modificar el frontend). Existe una solicitud de extracción que puede utilizarse para aplicar parches a sistemas que ejecutan DSpace 7.6.x, 8.x o 9.0. Aunque no es posible proteger completamente el sistema mediante soluciones alternativas, se puede aplicar una práctica recomendada. Los administradores deben inspeccionar cuidadosamente cualquier archivo SAF (que no hayan creado ellos mismos) antes de importar, prestando especial atención al archivo `contents` para verificar que no haga referencia a archivos externos a los archivos SAF.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-53622 changed 2025-07-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-vhvx-8xgc-99wf changed 2025-07-15 | CC-BY-4.0 |
| NVD | CVE-2025-53622 changed 2026-06-17 | Public domain |