The analysis of the vulnerability is based on the detailed security advisory provided, as no patch or commit information was available. The advisory clearly identifies a path traversal vulnerability in AVideo's HLS streaming endpoint (view/hls.php). The vulnerability stems from a split-oracle condition where the videoDirectory GET parameter is handled differently by two key functions.
-
Authorization Bypass (Video::getVideoFromFileName): The getVideoFromFileName function in objects/video.php truncates the input path at the first /, using only the initial segment for authorization checks. An attacker can use the directory of a public video as the first segment to pass this check.
-
Path Traversal (Video::getPathToFile): The getPathToFile function, also in objects/video.php, uses the full, unsanitized input path to construct the file path for video streaming. It does not filter out path traversal sequences (..), allowing an attacker to access files in other directories.
By crafting a videoDirectory parameter like public_video/../private_video, an attacker can successfully bypass the authorization for public_video while causing the system to serve the content of private_video. The identified vulnerable functions, Video::getVideoFromFileName and Video::getPathToFile, are the core components that enable this exploit. The entry point for the attack is the view/hls.php script, which calls these vulnerable functions.