{"answers":{"affected":"4 open source packages ship an affected version, including org.dspace:dspace-api. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-31195 in the wild and no public exploit code.","fix":"Upgrade org.dspace:dspace-api to a fixed version for your release line: 5.11 or 6.4.","what":"CVE-2022-31195 is a high-severity path traversal vulnerability in DSpace, published on 1 Aug 2022. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31195 and fix it if it is affected.\n\nWhat it is: CVE-2022-31195 is a high-severity path traversal vulnerability in DSpace, published on 1 Aug 2022. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-31195 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.dspace:dspace-api (Maven): affected from 4.0; fixed in 5.11\n- org.dspace:dspace-api (Maven): affected from 4.0; fixed in 5.11\n- org.dspace:dspace-api (Maven): affected from 6.0; fixed in 6.4\n- org.dspace:dspace-api (Maven): affected from 6.0; fixed in 6.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-31195/ (Markdown: https://insights.sbomify.com/CVE-2022-31195/index.md)","id":"CVE-2022-31195","markdown":"https://insights.sbomify.com/CVE-2022-31195/index.md","name":"CVE-2022-31195","record":{"aliases":["GHSA-8rmh-55h4-93h5"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"DSpace repository application","requires_auth":"high_privilege","summary":"Privileged users can exploit path traversal in SAF package imports to write files anywhere on the server, requiring an upgrade to mitigate.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"dspace","vendor":"duraspace"}],"cvss":{"score":7.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2025-08-20","github_poc":1,"max_poc_stars":0,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-08-20T17:50:01Z","kind":"github_poc","ref":"https://github.com/shoucheng3/DSpace__DSpace_CVE-2022-31195_5-10","stars":0,"title":null}],"tier":"poc_unverified"},"has_fix":true,"headline":"Path traversal vulnerability in Simple Archive Format package import in DSpace","id":"CVE-2022-31195","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"path_traversal","year":"2022"},"n_packages":4,"n_references":3,"next":{"headline":"Server-Side Request Forgery (SSRF) vulnerability in Databasir","id":"CVE-2022-31196"},"packages":[{"ecosystem":"Maven","fixed":["5.11"],"introduced":["4.0"],"last_affected":[],"package":"org.dspace:dspace-api","purl":null,"source":"GHSA-8rmh-55h4-93h5"},{"ecosystem":"Maven","fixed":["5.11"],"introduced":["4.0"],"last_affected":[],"package":"org.dspace:dspace-api","purl":"pkg:maven/org.dspace/dspace-api","source":"GHSA-8rmh-55h4-93h5"},{"ecosystem":"Maven","fixed":["6.4"],"introduced":["6.0"],"last_affected":[],"package":"org.dspace:dspace-api","purl":null,"source":"GHSA-8rmh-55h4-93h5"},{"ecosystem":"Maven","fixed":["6.4"],"introduced":["6.0"],"last_affected":[],"package":"org.dspace:dspace-api","purl":"pkg:maven/org.dspace/dspace-api","source":"GHSA-8rmh-55h4-93h5"}],"prev":{"headline":"Path traversal vulnerabilities in DSpace JSPUI submission upload","id":"CVE-2022-31194"},"products":["DSpace"],"published":"2022-08-01","related":[{"cvss_score":8.2,"headline":"Path traversal vulnerabilities in DSpace JSPUI submission upload","id":"CVE-2022-31194","kev_date_added":null,"published":"2022-08-01"},{"cvss_score":7.5,"headline":"High severity vulnerability that affects org.dspace:dspace-xmlui","id":"CVE-2016-10726","kev_date_added":null,"published":"2018-07-10"},{"cvss_score":7.2,"headline":"Communities and collections administrators can escalate their privilege up to system administrator","id":"CVE-2021-41189","kev_date_added":null,"published":"2021-10-29"},{"cvss_score":7.1,"headline":"Cross Site Scripting possible in DSpace JSPUI spellcheck and autocomplete tools","id":"CVE-2022-31191","kev_date_added":null,"published":"2022-08-01"},{"cvss_score":7.1,"headline":"Cross Site Scripting possible in DSpace JSPUI \"Request a Copy\" feature","id":"CVE-2022-31192","kev_date_added":null,"published":"2022-08-01"},{"cvss_score":7.1,"headline":"URL Redirection to Untrusted Site in Dspace JSPUI","id":"CVE-2022-31193","kev_date_added":null,"published":"2022-08-01"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["DSpace"]},"summary":"Privileged users can exploit path traversal in SAF package imports to write files anywhere on the server, requiring an upgrade to mitigate.","url":"https://insights.sbomify.com/CVE-2022-31195/"}