CVE-2024-38364

CVE-2024-38364 is a low-severity cross-site scripting (XSS) vulnerability in org.dspace:dspace-server-webapp (maven), affecting versions >= 7.0, < 7.6.2. It is fixed in 7.6.2.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

DSpace Cross Site Scripting (XSS) via a deposited HTML/XML document

Workarounds

DSpace sites running 7.6 or 7.6.1 can fix this issue by adding the following webui.content_disposition_format settings to their dspace.cfg (or local.cfg). These settings force all HTML, XML, RDF & JavaScript files to always be downloaded to a user's machine, blocking the attack. For more details see PR #9638

webui.content_disposition_format = text/html
webui.content_disposition_format = text/javascript
webui.content_disposition_format = text/xml
webui.content_disposition_format = rdf

These settings will take effect immediately. There is no need to restart Tomcat.

To verify the settings are working: upload an HTML or XML file to an in-progress submission. Attempt to download the file. The file should not open in your browser window. Instead, it should download to your local computer.

DSpace sites running 7.0 through 7.5 will need to either (CHOOSE ONE):

  • Upgrade to 7.6.2 or 8.0
  • Or, upgrade to 7.6 or 7.6.1 and then apply the configuration change mentioned above
  • Or, manually add the webui.content_disposition_format setting (which was first released in 7.6), and then apply the configuration changes mentioned above.
    • The webui.content_disposition_format setting can be added by applying the changes in PR #8891. A patch file is also available.
    • Please be aware this patch may not apply cleanly to all prior versions of 7.x. In that scenario, you would need to find a way to manually apply the changes or consider a different workaround.
  • Or, find a way in your Apache or NGinx proxy to force the Content-Disposition: attachment header to be sent for all files downloaded via /server/api/core/bitstreams/[uuid]/content in the REST API.
    • NOTE: This workaround will patch the vulnerability. However, it does so by no longer allowing users to open any downloaded files in their browser window. (This behavior may or may not be desirable in the long term, so you may wish to remove it in the future, once you have upgraded.)
    • For example, in Apache, using "mod_headers", you may add a configuration similar to this in your <VirtualHost>:
      # Set "Content-Disposition: attachment" whenever path is /server/api/core/bitstreams/[uuid]/content
      Header set Content-Disposition attachment "expr=%{REQUEST_URI} =~ m#^/server/api/core/bitstreams/.*/content$#"
      

References

Discovered and reported by Muhammad Zeeshan (Xib3rR4dAr)

For more information

If you have any questions or comments about this advisory:

Impact

In DSpace 7.0 through 7.6.1, when an HTML, XML or JavaScript Bitstream is downloaded, the user's browser may execute any embedded JavaScript. If that embedded JavaScript is malicious, there is a risk of an XSS attack.

This attack may only be initialized by a user who already has Submitter privileges in the repository. The submitter must upload the malicious HTML/XML/JavaScript file themselves. The attack itself would not occur until a visitor or logged-in user downloads the file or clicks on a download link shared by the attacker.

If your site is running the frontend and backend from separate domains, CORS and CSRF protection built into DSpace help to limit the impact of the attack.

If the repository is configured to only download HTML / XML / JavaScript Bitstreams using the Content-Disposition: attachment header, then the attack is no longer possible. See "Workarounds" below.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

CVE-2024-38364 has a CVSS score of 2.6 (Low). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (7.6.2); upgrading removes the vulnerable code path.

Affected versions

org.dspace:dspace-server-webapp (>= 7.0, < 7.6.2)

Security releases

org.dspace:dspace-server-webapp → 7.6.2 (maven)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

The fix is included in both 8.0 and 7.6.2. Please upgrade to one of these versions, or manually apply one of the "Workarounds" below.

If you are already running 7.6 or 7.6.1, then this vulnerability can be fixed via a configuration update in your dspace.cfg configuration file. See details in below.

Frequently Asked Questions

  1. What is CVE-2024-38364? CVE-2024-38364 is a low-severity cross-site scripting (XSS) vulnerability in org.dspace:dspace-server-webapp (maven), affecting versions >= 7.0, < 7.6.2. It is fixed in 7.6.2. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2024-38364? CVE-2024-38364 has a CVSS score of 2.6 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of org.dspace:dspace-server-webapp are affected by CVE-2024-38364? org.dspace:dspace-server-webapp (maven) versions >= 7.0, < 7.6.2 is affected.
  4. Is there a fix for CVE-2024-38364? Yes. CVE-2024-38364 is fixed in 7.6.2. Upgrade to this version or later.
  5. Is CVE-2024-38364 exploitable, and should I be worried? Whether CVE-2024-38364 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2024-38364 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2024-38364? Upgrade org.dspace:dspace-server-webapp to 7.6.2 or later.

Stop the waste.
Protect your environment with Kodem.