Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
HLS vulnerability in both FFMpeg and NativeHlsFD #8227
Comments
|
I've suggested a patch for disabling the 'file:' protocol in #8228. Note that actually all you need to do to get access to a sensitive file is to run Unfortunately there doesn't seem to be a way to disable protocols on ffmpeg at runtime, which would be the simple solution. |
[YoutubeDL] urlopen: disable the 'file:' protocol (#8227)
|
Fixed in ffmpeg git master (and few more recent commits). |
|
Thanks for the useful information @Kagami ! Now ffmpeg is fixed both in git-master and Arch Linux's package, and I guess other distributions will fix their packages soon. If there are more HLS vulnerability discovered, this issue can be re-opened. |
A recent post points out that FFMpeg can cause contents of arbitrary files (for example
/etc/passwd) being accessible on the Internet via a malicious input file. [1][2] The reaction of Arch Linux developers is disabling affected components before they are fixed. [3] In this commit,concat:protocol and HLS support are disabled. The former one is not used in the mainline codebase, just in some pull requests (#2844). The latter one is more serious. I've just updated my copy to the latest official Arch binary. Downloading an YouTube live stream gives:Running the command directly does not give more information:
Before the problem fixed or Arch developers decided to have a different workaround, the only way is suggesting
--hls-native-native. However,NativeHlsFDis also vulnerable. With the followingevil.m3u8:youtube-dl gives undesired results:
All servers using youtube-dl are affected, whether they use FFMpeg or
NativeHlsFD. I guess onlyhttp:,https:anddata:protocols are necessary forYoutubeDL.urlopen()? We should check URLs before passing them into urllib2.[1] https://news.ycombinator.com/item?id=10893301
[2] http://habrahabr.ru/company/mailru/blog/274855/ (The original post, in Russian)
[3] https://projects.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/ffmpeg&id=ef0b4890e18a52e976274d02a09738f73a07f4d2