local file disclosure via FFmpeg hls processing
FFmpeg's HLS processing could be triggered through GAB2 subtitle chunks inside an AVI file, allowing an attacker to read local files from conversion nodes. The attacker could retrieve files such as /etc/passwd, which were then shown in generated videos.
- Triaged in 16 hours
- Fixed in 17 hours
- Paid in 14 days
- Disclosed after 47 days
Summary by the program
Vulnerability in FFmpeg.
Summary by the researcher
FFmpeg is video encoding software that is used by VK for preview generation and video conversion. FFmpeg is known to process HLS playlists that may contain references to external files. I was able to fire this feature using GAB2 subtitle chunks inside an AVI file. After that, I was able to retrieve conversion nodes' local files via XBIN codec, resulting in nice hackerish videos with file contents.
This issue was disclosed among others at Phdays conference 2017, the slides are available at https://docs.google.com/presentation/d/1yqWy_aE3dQNXAhW8kxMxRqtP7qMHaIfMzUDpEqFneos/edit, the screenshot of this particular issue (that is, the screenshot of the video showing /etc/passwd from a VK server) is near the end of the presentation.
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 FFmpeg's HLS demuxer allowed external file references to be triggered from within an AVI container via GAB2 subtitle chunks, without restricting local file access.
What the attacker needed
Ability to upload a crafted AVI file; service uses FFmpeg for conversion
How it was found
- Create an AVI file containing GAB2 subtitle chunks that trigger HLS playlist processing.
- Upload the crafted AVI file to a service that uses FFmpeg for preview generation or video conversion.
- FFmpeg processes the HLS playlist and reads local files from the conversion node.
- The local file contents are embedded in the generated video via the XBIN codec.
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.
FFmpeg is a tool that converts video files. It can also read playlists that point to other files, and the researcher found a way to make it read files on the server itself by hiding instructions inside a video file. This meant private files on the server could be copied into the output video.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.