# CVE-2025-53621: DSpace is vulnerable to XML External Entity injection during archive imports

> Attackers can exploit XXE in DSpace imports to read local files or make external connections, requiring admin trust to trigger the malicious archive.

- **Severity:** Medium 6.9 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:H/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 15 Jul 2025
- **Updated:** 15 Jul 2025
- **Also known as:** GHSA-jjwr-5cfh-7xwh

## What is CVE-2025-53621?

CVE-2025-53621 is a medium-severity vulnerability in DSpace, published on 15 Jul 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

DSpace open source software is a repository application which provides durable access to digital resources. Two related XML External Entity (XXE) injection possibilities impact all versions of DSpace prior to 7.6.4, 8.2, and 9.1. External entities are not disabled when parsing XML files during import of an archive (in Simple Archive Format), either from command-line (`./dspace import` command) or from the "Batch Import (Zip)" user interface feature. External entities are also not explicitly disabled when parsing XML responses from some upstream services (ArXiv, Crossref, OpenAIRE, Creative Commons) used in import from external sources via the user interface or REST API. An XXE injection in these files may result in a connection being made to an attacker's site or a local path readable by the Tomcat user, with content potentially being injected into a metadata field. In the latter case, this may result in sensitive content disclosure, 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. Please upgrade to one of these versions. For those who cannot upgrade immediately, it is possible to manually patch the DSpace backend. One may also apply some best practices, though the protection provided is not as complete as upgrading. Administrators must carefully inspect any SAF archives (they did not construct themselves) before importing. As necessary, affected external services can be disabled to mitigate the ability for payloads to be delivered via external service APIs.

Weakness: CWE-611 (Improper Restriction of XML External Entity Reference)

## Which versions are affected by CVE-2025-53621?

6 open source packages ship an affected version, including org.dspace:dspace-api.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.dspace:dspace-api` | Maven | All versions | 7.6.4 |
| `org.dspace:dspace-api` | Maven | All versions | 7.6.4 |
| `org.dspace:dspace-api` | Maven | From 8.0 | 8.2 |
| `org.dspace:dspace-api` | Maven | From 8.0 | 8.2 |
| `org.dspace:dspace-api` | Maven | From 9.0 | 9.1 |
| `org.dspace:dspace-api` | Maven | From 9.0 | 9.1 |

## How do I fix CVE-2025-53621?

Upgrade org.dspace:dspace-api to a fixed version for your release line: 7.6.4, 8.2 or 9.1.

## Is CVE-2025-53621 being exploited?

There is no known exploitation of CVE-2025-53621 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-53621 and fix it if it is affected.

What it is: CVE-2025-53621 is a medium-severity vulnerability in DSpace, published on 15 Jul 2025. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-53621 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.dspace:dspace-api (Maven): affected all versions; fixed in 7.6.4
- org.dspace:dspace-api (Maven): affected all versions; fixed in 7.6.4
- org.dspace:dspace-api (Maven): affected from 8.0; fixed in 8.2
- org.dspace:dspace-api (Maven): affected from 8.0; fixed in 8.2
- org.dspace:dspace-api (Maven): affected from 9.0; fixed in 9.1
- org.dspace:dspace-api (Maven): affected from 9.0; fixed in 9.1

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-53621/ (Markdown: https://insights.sbomify.com/CVE-2025-53621/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-53621
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-53621
- OSV: https://osv.dev/vulnerability/CVE-2025-53621

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-53621/
Summaries are generated and may contain mistakes; the official description above is the record.
