CVE-2023-30626: Jellyfin vulnerable to directory traversal and file write causing arbitrary code execution

Published Apr 24, 2023
·
Updated

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.

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

Patches 10.8.10

Workarounds N/A

References

A complete write-up is available here: https://gebir.ge/blog/peanut-butter-jellyfin-time/

Other sources

Jellyfin is a free-software media system. Versions starting with 10.8.0 and prior to 10.8.10 and prior have a directory traversal vulnerability inside the ClientLogController, specifically /ClientLog/Document. When combined with a cross-site scripting vulnerability (CVE-2023-30627), this can result in file write and arbitrary code execution. Version 10.8.10 has a patch for this issue. There are no known workarounds.

Affected Software

2 affected componentsFixes available
nuget/Jellyfin.Controller>=10.8.0<10.8.10
10.8.10
Jellyfin Jellyfin>=10.8.0<10.8.10

Event History

Apr 24, 2023
CVE Published
via MITRE·08:06 PM
Data Sourced
via MITRE·08:06 PM
DescriptionSeverityWeakness
Advisory Published
10:39 PM

Frequently Asked Questions

1

What is CVE-2023-30626?

CVE-2023-30626 is a vulnerability in Jellyfin versions prior to 10.8.10 that can result in directory traversal, file write, and potential remote code execution.

2

How does CVE-2023-30626 impact Jellyfin?

CVE-2023-30626 can result in directory traversal, file write, and potential remote code execution on Jellyfin instances.

3

What is the severity of CVE-2023-30626?

CVE-2023-30626 has a severity rating of 8.1, which is considered high.

4

How can I fix CVE-2023-30626?

To fix CVE-2023-30626, update Jellyfin to version 10.8.10 or later.

5

What are the references for CVE-2023-30626?

The references for CVE-2023-30626 are: [GitHub Advisory](https://github.com/jellyfin/jellyfin-web/security/advisories/GHSA-89hp-h43h-r5pq), [ClientLogController.cs](https://github.com/jellyfin/jellyfin/blob/22d880662283980dec994cd7d35fe269613bfce3/Jellyfin.Api/Controllers/ClientLogController.cs#L44), [GitHub Commit](https://github.com/jellyfin/jellyfin/commit/82ad2633fdfb1c37a158057c7935f83e1129eda7).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203