Summary
A path traversal issue in Jellyfin's ClientLog document handling lets authenticated non-admin users influence the filesystem path used for storing uploaded log files.
By injecting directory traversal sequences into the Authorization header's Client field, an attacker can cause Jellyfin to write arbitrary content to unintended locations accessible to the service account.
Affected context
This vulnerability occurs in Jellyfin deployments where the /ClientLog/Document endpoint is exposed to authenticated users and the server persists client-provided logs to disk using unsanitized metadata from request headers.
It is relevant when Jellyfin runs under an account with write access to directories that should not be influenced by regular users, such as configuration, log, or temporary directories.
Exploit preconditions
- Attack surface: HTTP POST requests to the
/ClientLog/Documentendpoint. - Required access: Any authenticated non-admin Jellyfin user account.
- Trigger point: Submission of a log document where the Authorization header's
Clientfield contains../traversal sequences. - Why exploitation is possible: The server concatenates the
ClientandVersionfields directly into the filename without normalization or validation, allowing user-controlled paths under the Jellyfin service user's writable directories.
Why this happens
The underlying issue is unsanitized use of user-controlled data as part of a filesystem path, mapping to CWE-22: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal).
Jellyfin's ClientLog implementation uses values from the Authorization header (Client and Version) directly when constructing the destination filename and does not strip traversal tokens or enforce a fixed directory root.
This pattern allows crafted input such as ../ sequences to escape the intended log directory and target arbitrary writable paths.
Potential impact
- An attacker may cause Jellyfin to overwrite or create arbitrary
.logfiles under directories writable by the service user. - An attacker could potentially disrupt application behavior by tampering with auxiliary log or data files that the application later consumes.
- The system can experience data loss or corruption if important log or auxiliary files are overwritten.
- Under certain configurations, arbitrary file writes can contribute to broader compromise when combined with other weaknesses (e.g., log file inclusion or script execution from writable paths).
General mitigation guidance
Effective mitigation focuses on restricting how user input influences filesystem paths and reducing the privileges of the service account.
Common defensive patterns include:
- Enforcing strict whitelisting or canonicalization of filename components derived from headers or request data, rejecting traversal tokens and unexpected characters.
- Confined storage of uploaded files to a dedicated directory, combined with path-joining routines that resolve and verify the final path remains within that directory.
- Generating filenames server-side (e.g., using UUIDs) rather than trusting client-supplied identifiers.
- Running the Jellyfin service under a least-privilege account with limited write access, so that even if a path traversal occurs, the impact is constrained.
How teams detect issues like this
Detection typically involves both code-level and runtime checks:
- Static analysis rules that flag direct concatenation of user-controlled input into path strings or calls to file APIs without normalization.
- Code review practices that scrutinize any endpoint handling uploads or logs, ensuring that header fields, query parameters, and body data are not used as raw path components.
- Application-level logging and monitoring for suspicious filenames containing traversal sequences (e.g.,
../) or unexpected directory locations for client logs. - Security policies in CI/CD that require validation utilities for path handling and automated scans of filesystem-related changes before deployment.

