The vulnerability lies in several controllers within the Statamic CMS's Control Panel (CP) that handle asset-related requests. The core issue is a 'Missing Authorization' (CWE-862) weakness. Authenticated users with access to the control panel, but without specific permissions to view certain assets, could still access them through different endpoints.
The analysis of the patch 5a6f47246edf3a0c453727ffecbfa14333a6bc8a reveals the following:
-
Direct Asset Access: The PdfController::show and SvgController::show methods directly served asset files without verifying if the user was authorized to view the specific asset. The patch adds a call to $this->authorize('view', $asset); to enforce this check.
-
Thumbnail Access: Similarly, the ThumbnailController::show method, which generates image thumbnails, lacked an authorization check. An attacker could view thumbnails of images they were not supposed to see. The patch adds the same authorization check here.
-
Folder Metadata Modification: The FoldersController::update method, along with its corresponding route, was completely removed. This indicates it provided a way to modify asset folder information without proper authorization checks.
By exploiting these missing checks, a low-privileged but authenticated user could download original assets or view their thumbnails and metadata, bypassing the intended permission model.