Vulnerabilities in pkg:nuget/Jellyfin.Controller
PACKAGECVE-2023-30626 is a HIGH (CVSS 8.8) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Jellyfin.Controller libraries in the NuGet ecosystem. The issue involves directory traversal + file write causing arbitrary code execution. Remediation is available by upgrading affected packages to version 10.8.10.
pkg:nuget/Jellyfin.Controller
Vulnerability advisories affecting package pkg:nuget/Jellyfin.Controller. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9p5f-5x8v-x65m | CVE-2023-30626 | HIGH | Directory traversal + file write causing arbitrary code execution |
CVE-2023-30626 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2023-30626
To remediate this vulnerability, upgrade all affected Jellyfin.Controller dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade Jellyfin.Controller to 10.8.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for Jellyfin.Controller
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-30626, inspect your project dependencies for Jellyfin.Controller:
inspect dependencies for Jellyfin.Controller
Analyze the terminal output to locate any version of Jellyfin.Controller in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.8.10), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Jellyfin.Controller, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-30626 Affected Jellyfin.Controller Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Jellyfin.Controller
|
NuGet |
≥ 10.8.0
< 10.8.10
|
10.8.10
|
References
Frequently Asked Questions
What is CVE-2023-30626?
Which Jellyfin.Controller versions are affected?
What version fixes CVE-2023-30626?
Is Jellyfin.Controller affected?
What is the CVSS score of CVE-2023-30626?
What CWE is associated with CVE-2023-30626?
How can I check NuGet dependencies for CVE-2023-30626?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9p5f-5x8v-x65m",
"modified" : "2023-05-09T16:24:16Z",
"published" : "2023-04-24T22:39:03Z",
"aliases" : [ "CVE-2023-30626" ],
"summary" : "Directory traversal + file write causing arbitrary code execution",
"details" : "### Impact\nFrederic 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.\n\nThe general process is (using the example of setting an intro video as the payload):\n\n* Create a session as a low-priviledged user with a crafted authorization header\n* Upload an executable that contains a malicious plugin inline via /ClientLog/Document\n* (Admin hovers over our device in dashboard -> XSS payload gets triggered)\n* XSS Payload tries to set encoder path to our uploaded \"log\" file via /System/MediaEncoder/Path\n* The request fails, but in the process our executable actually runs (I guess for verifying if the path points to a valid ffmpeg version)\n* The executable will create a plugin folder and place the inlined plugin DLL inside it\n* The XSS payload shuts down the server via /System/Shutdown (separate CVE in `jellyfin-web`)\n* After (manually) starting the server, the plugin gets loaded and will:\n * write a new video into the Jellyfin temp folder and register it\n * register this video as the new intro\n * and finally provide a malicious endpoint that simply executes system commands and sends back the results\n\nThe ability to write arbitrary content to log files was added in #5918 to allow flexibility to client logging.\n\nThe following two sections detail Frederic's exact determinations regarding the two vulnerabilities.\n\n#### Directory traversal and file write\n\nI've been reading the codebase here and there for a couple of days and found a directory traversal inside the ClientLogController, specifically /ClientLog/Document.\n\nThe GetRequestInformation method retrieves the name and version of the client from the HttpContext.User object.\n\nThose 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().\n\nSetting 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.\n\nHowever, 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 :^).\n\nAnyway, 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.\n\nThis stops an attacker from providing malicious DLLs that implement the correct interfaces in order to be recognized as legitimate plugins.\n\nOn 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.\n\nFor the stored XSS component, see https://github.com/jellyfin/jellyfin-web/security/advisories/GHSA-89hp-h43h-r5pq\n\n### Patches\n10.8.10\n\n### Workarounds\nN/A\n\n### References\n\nA complete write-up is available here: https://gebir.ge/blog/peanut-butter-jellyfin-time/",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "NuGet",
"name" : "Jellyfin.Controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "10.8.0"
}, {
"fixed" : "10.8.10"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jellyfin/jellyfin-web/security/advisories/GHSA-89hp-h43h-r5pq"
}, {
"type" : "WEB",
"url" : "https://github.com/jellyfin/jellyfin/security/advisories/GHSA-9p5f-5x8v-x65m"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-30626"
}, {
"type" : "WEB",
"url" : "https://github.com/jellyfin/jellyfin/pull/5918"
}, {
"type" : "WEB",
"url" : "https://github.com/jellyfin/jellyfin/commit/82ad2633fdfb1c37a158057c7935f83e1129eda7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jellyfin/jellyfin"
}, {
"type" : "WEB",
"url" : "https://github.com/jellyfin/jellyfin/blob/22d880662283980dec994cd7d35fe269613bfce3/Jellyfin.Api/Controllers/ClientLogController.cs#L44"
}, {
"type" : "WEB",
"url" : "https://github.com/jellyfin/jellyfin/releases/tag/v10.8.10"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-04-24T22:39:03Z",
"nvd_published_at" : "2023-04-24T21:15:09Z"
}
}