SSRF vulnerability via FFmpeg HLS processing
The video upload feature accepted files with a changed Content-Type, allowing a PHP webshell to be uploaded, and a crafted HLS playlist caused the server-side video processor to make requests to an attacker-controlled host. An attacker could distribute dangerous files from a trusted domain and use the server to reach internal or external resources.
medium.com
Published on medium.com
Once I performed pentest for one famous company. The object of testing was a platform for searching, licensing and managing music with using it on youtube.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could upload dangerous files that are served from a trusted domain, and could make the server send requests to arbitrary hosts, potentially exposing sensitive data or enabling a small denial-of-service; the uploaded webshell itself could not be executed because the page was served as plain text.
What the attacker needed
A user account with video upload access; ability to change the uploaded file's Content-Type
How it was found
- Find the video upload form in the user account.
- Change the Content-Type and filename to upload a PHP file instead of a video.
- Upload a specially crafted HLS playlist as a video.
- Wait for the server to process the playlist and display a preview.
- Observe the request arriving at the tester's own server, confirming SSRF.
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 write-up has not been written yet. The Original tab links to the source.
The site let people upload video files, but it did not properly check what kind of file was being sent. By lying about the file type, the tester uploaded a small program (a webshell) that the server would normally run. Separately, a specially made playlist file made the video-processing software fetch a web address chosen by the tester, which is called server-side request forgery (SSRF).
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.