Summary
Directory traversal + file write causing arbitrary code execution
Directory traversal and file write
I've been reading the codebase here and there for a couple of days and found a directory traversal inside the ClientLogController, specifically /ClientLog/Document.
The GetRequestInformation method retrieves the name and version of the client from the HttpContext.User object.
Those values are attacker controlled when authenticating against the API. Both values are interpolated into a string, which ultimately ends up as an argument to Path.Combine().
Setting a client name to the relative path "........\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\test" will write a file with completely attacker controlled content to the executing user's autostart directory.
However, because the attacker only partially controls the filename, exploitation proves to be tricky. That's because the resulting file will always end in ".log", which means putting something in the autostart directory is only going to open notepad on startup. I mean, we can at least insult the user :^).
Anyway, the next logical step would be to write into Jellyfin's plugins directory, but the sub-directories there (of which the already existing configurations directory conveniently counts as one!) are only getting scanned for ".dll" files.
This stops an attacker from providing malicious DLLs that implement the correct interfaces in order to be recognized as legitimate plugins.
On Linux, there might be more options. Running as the standard root user inside a container, an attacker could of course write anywhere. There's the very interesting "/etc/cron.d" directory, where an attacker can place cron jobs that get picked up automatically. Those files, however, can't contain a dot. Moreover, inside the container the cronjobs are probably not being executed, as the Jellyfin process should be only one running.
For the stored XSS component, see https://github.com/jellyfin/jellyfin-web/security/advisories/GHSA-89hp-h43h-r5pq
Workarounds
N/A
References
A complete write-up is available here: https://gebir.ge/blog/peanut-butter-jellyfin-time/
Impact
Frederic Linn (@FredericLinn) has reported a series of vulnerabilities that can result in directory traversal, file write, and potential remote code execution on Jellyfin instances. The general process involves chaining several exploits including a stored XSS vulnerability and can be used by an unprivileged user.
The general process is (using the example of setting an intro video as the payload):
- Create a session as a low-priviledged user with a crafted authorization header
- Upload an executable that contains a malicious plugin inline via /ClientLog/Document
- (Admin hovers over our device in dashboard -> XSS payload gets triggered)
- XSS Payload tries to set encoder path to our uploaded "log" file via /System/MediaEncoder/Path
- The request fails, but in the process our executable actually runs (I guess for verifying if the path points to a valid ffmpeg version)
- The executable will create a plugin folder and place the inlined plugin DLL inside it
- The XSS payload shuts down the server via /System/Shutdown (separate CVE in
jellyfin-web) - After (manually) starting the server, the plugin gets loaded and will:
- write a new video into the Jellyfin temp folder and register it
- register this video as the new intro
- and finally provide a malicious endpoint that simply executes system commands and sends back the results
The ability to write arbitrary content to log files was added in #5918 to allow flexibility to client logging.
The following two sections detail Frederic's exact determinations regarding the two vulnerabilities.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2023-30626 has a CVSS score of 8.8 (High). The vector is network-reachable, low privileges required, and no user interaction. 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 (10.8.10); upgrading removes the vulnerable code path.
Affected versions
Security releases
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
10.8.10
Frequently Asked Questions
- What is CVE-2023-30626? CVE-2023-30626 is a high-severity path traversal vulnerability in Jellyfin.Controller (nuget), affecting versions >= 10.8.0, < 10.8.10. It is fixed in 10.8.10. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2023-30626? CVE-2023-30626 has a CVSS score of 8.8 (High). 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.
- Which versions of Jellyfin.Controller are affected by CVE-2023-30626? Jellyfin.Controller (nuget) versions >= 10.8.0, < 10.8.10 is affected.
- Is there a fix for CVE-2023-30626? Yes. CVE-2023-30626 is fixed in 10.8.10. Upgrade to this version or later.
- Is CVE-2023-30626 exploitable, and should I be worried? Whether CVE-2023-30626 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
- What actually determines whether CVE-2023-30626 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.
- How do I fix CVE-2023-30626? Upgrade
Jellyfin.Controllerto 10.8.10 or later.