The vulnerability was an improper access control issue where screenshot images were served directly by the HTTP server (e.g., Nginx, Apache) without any authentication or authorization checks by the Weblate application. The application's templates generated direct URLs to these files within the /media/ directory. This allowed an unauthenticated attacker who could guess the file path to access potentially sensitive information in the screenshots.
The patch remediates this architectural flaw by removing the direct serving of the /media/ directory from the web server configuration. Instead, it introduces a new Django view, ScreenshotView, which acts as a controlled proxy for serving screenshot images. This view utilizes a new base class, ScreenshotBaseView, which contains the get_object method. This method enforces access control by checking if the requesting user has the appropriate permissions for the project component associated with the screenshot. The application's templates were updated to point to this new secure view, ensuring that all screenshot access is now mediated and authorized by the application.