Skip to content
Path traversal Advisory Intermediate CVE-2021-21402

GHSL-2021-050: Unauthenticated arbitrary file read in Jellyfin - CVE-2021-21402

Jellyfin's legacy HLS audio and video segment routes on Windows allowed unauthenticated attackers to read arbitrary files by injecting Windows path separators into route parameters, and a trailing slash could bypass the extension restriction. An attacker could download sensitive files such as the database containing passwords.

jarlob Follow

Originally disclosed on GitHub Security Lab

Both the /Audio/{Id}/hls/{segmentId}/stream.mp3 and /Audio/{Id}/hls/{segmentId}/stream.aac routes allow unauthenticated [1] arbitrary file read on Windows. It is possible to set the {segmentId} part of the route to a relative or absolute path using the Windows path separator \ (%5C when URL encoded).

jarlob, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the route parameters were concatenated into a file path without validating that the result stayed inside the intended transcode directory, and Windows backslash separators allowed path traversal.

Impact

An unauthenticated attacker could read any file on a Windows Jellyfin server, including the database with passwords, especially if the server is reachable from the internet; the image routes only exposed image files, and the subtitle overwrite required administrator rights.

What the attacker needed

Jellyfin running on Windows; No account needed for issues 1, 2 and 4; For issue 2, a .m3u8 file in the transcodes folder; For issue 3, an authenticated session

The fix

Version 10.7.1 was released with fixes.

How it was found

  1. Send a request to the audio HLS segment route with a segment identifier containing encoded Windows backslashes and a trailing slash.
  2. The server builds a file path from that identifier and returns the requested file.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Jellyfin is a media server that streams audio and video. Some web addresses it used to deliver pieces of a stream accepted a file path from the user and did not check it, so a stranger could ask the server for any file on the machine, such as its password database. The problem only affected servers running on Windows.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by jarlob

View all

192 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.