/

CVE-2026-46652

Severity:

CRITICAL RISK

(9.8)

Path Traversal (CWE-22) in Goobi Viewer Downloader

CVE-2026-46652

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-73

Impact:

Arbitrary File Write and Potential Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in Goobi viewer allows attacker-controlled response headers to influence where downloaded content is written on the server. If the viewer fetches content from a malicious HTTP server, crafted absolute paths or traversal sequences may cause arbitrary file writes and, in some deployments, remote code execution as the Tomcat operating-system user.

A path traversal vulnerability in Goobi viewer allows attacker-controlled response headers to influence where downloaded content is written on the server. If the viewer fetches content from a malicious HTTP server, crafted absolute paths or traversal sequences may cause arbitrary file writes and, in some deployments, remote code execution as the Tomcat operating-system user.

Affected context

The issue occurs in the Goobi viewer's external file download functionality when a server-supplied Content-Disposition filename is used to construct a destination path. Deployments are at risk when the application can fetch content from an attacker-controlled or compromised HTTP server and the Tomcat process has write access to sensitive locations, including the deployed web-application directory.

The issue occurs in the Goobi viewer's external file download functionality when a server-supplied Content-Disposition filename is used to construct a destination path. Deployments are at risk when the application can fetch content from an attacker-controlled or compromised HTTP server and the Tomcat process has write access to sensitive locations, including the deployed web-application directory.

Exploit preconditions

  • Attack surface: External file retrieval performed by the Goobi viewer
  • Required access: Ability to cause the viewer to fetch from, or otherwise trust responses from, a malicious HTTP server
  • Trigger point: Processing the Content-Disposition response header and resolving the destination filename
  • Why exploitation is possible: Directory components are accepted without adequate containment checks, allowing absolute paths or traversal sequences to escape the intended download directory
  • Attack surface: External file retrieval performed by the Goobi viewer
  • Required access: Ability to cause the viewer to fetch from, or otherwise trust responses from, a malicious HTTP server
  • Trigger point: Processing the Content-Disposition response header and resolving the destination filename
  • Why exploitation is possible: Directory components are accepted without adequate containment checks, allowing absolute paths or traversal sequences to escape the intended download directory

Why this happens

The vulnerable code derives a local filename from an HTTP response header and passes it to path resolution without removing directory components or verifying that the resulting path remains within an approved directory. This is a path traversal issue mapped to CWE-22, with characteristics of improper control over a resource identifier under CWE-73. The insecure pattern combines attacker-influenced path data with filesystem operations and insufficient canonicalization or boundary validation.

The vulnerable code derives a local filename from an HTTP response header and passes it to path resolution without removing directory components or verifying that the resulting path remains within an approved directory. This is a path traversal issue mapped to CWE-22, with characteristics of improper control over a resource identifier under CWE-73. The insecure pattern combines attacker-influenced path data with filesystem operations and insufficient canonicalization or boundary validation.

Potential impact

  • Attacker-controlled files may be written to arbitrary locations writable by the Tomcat process
  • Application files, configuration, or other server data may be overwritten
  • The deployed web application may be modified
  • Arbitrary code may execute with the privileges of the Tomcat operating-system user
  • The host or connected services could be compromised further
  • Attacker-controlled files may be written to arbitrary locations writable by the Tomcat process
  • Application files, configuration, or other server data may be overwritten
  • The deployed web application may be modified
  • Arbitrary code may execute with the privileges of the Tomcat operating-system user
  • The host or connected services could be compromised further

General mitigation guidance

Mitigation generally focuses on treating response-derived filenames as untrusted data and enforcing a strict destination boundary.

Common defensive patterns include:

  • Discarding directory components and accepting only a safe basename
  • Allowing only constrained filename characters and lengths
  • Resolving paths against a fixed download directory and verifying the normalized result remains inside that directory
  • Using generated server-side filenames rather than client- or server-supplied names where practical
  • Restricting outbound fetch targets and validating redirect destinations
  • Running Tomcat with the least filesystem privileges necessary
  • Keeping deployed application directories non-writable by the application process where feasible

Mitigation generally focuses on treating response-derived filenames as untrusted data and enforcing a strict destination boundary.

Common defensive patterns include:

  • Discarding directory components and accepting only a safe basename
  • Allowing only constrained filename characters and lengths
  • Resolving paths against a fixed download directory and verifying the normalized result remains inside that directory
  • Using generated server-side filenames rather than client- or server-supplied names where practical
  • Restricting outbound fetch targets and validating redirect destinations
  • Running Tomcat with the least filesystem privileges necessary
  • Keeping deployed application directories non-writable by the application process where feasible

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules that identify external header values reaching filesystem path APIs
  • Code review checks for direct use of Content-Disposition filenames in path construction
  • Tests using absolute paths, parent-directory components, encoded separators, and platform-specific path forms
  • Runtime monitoring for unexpected writes outside designated download directories
  • Filesystem and application policies that alert on modifications to deployed web-application content
  • Automated security review tools configured to detect path traversal and arbitrary file-write data flows

Organizations can look for this weakness through:

  • Static analysis rules that identify external header values reaching filesystem path APIs
  • Code review checks for direct use of Content-Disposition filenames in path construction
  • Tests using absolute paths, parent-directory components, encoded separators, and platform-specific path forms
  • Runtime monitoring for unexpected writes outside designated download directories
  • Filesystem and application policies that alert on modifications to deployed web-application content
  • Automated security review tools configured to detect path traversal and arbitrary file-write data flows

Sources

SourceLink
github.comgithub.com/intranda/goobi-viewer-core/commit/5281245708447ae3419cb42492fbb8af731a2ce5
github.comgithub.com/intranda/goobi-viewer-core/releases/tag/v26.05
github.comgithub.com/intranda/goobi-viewer-core/security/advisories/GHSA-r386-2frm-w3v6

Frequently asked

questions

It can be, when the viewer is configured to retrieve external content and an attacker can make it contact a malicious or compromised HTTP server. Exploitability depends on the application's fetch workflow and network access controls.

The attacker generally needs a way to influence the URL or external source that the viewer contacts, or to control a server whose response the viewer already trusts. Filesystem permissions determine the severity of the resulting write.

Treat response filenames as untrusted, reduce them to safe basenames or generate local names, and verify that the normalized destination remains within a dedicated non-sensitive directory.

Use strict path-boundary checks, constrain outbound fetch behavior, apply least-privilege filesystem permissions, and include traversal-focused tests and static analysis in the development process.

It can be, when the viewer is configured to retrieve external content and an attacker can make it contact a malicious or compromised HTTP server. Exploitability depends on the application's fetch workflow and network access controls.

The attacker generally needs a way to influence the URL or external source that the viewer contacts, or to control a server whose response the viewer already trusts. Filesystem permissions determine the severity of the resulting write.

Treat response filenames as untrusted, reduce them to safe basenames or generate local names, and verify that the normalized destination remains within a dedicated non-sensitive directory.

Use strict path-boundary checks, constrain outbound fetch behavior, apply least-privilege filesystem permissions, and include traversal-focused tests and static analysis in the development process.

Find out what's already
exploitable in your codebase.