The vulnerability described is an authorization bypass when downloading files. The advisory mentions that a specific API endpoint did not properly verify user permissions. To pinpoint the vulnerable function, I analyzed the changes between the last vulnerable version (2026.4.1) and the first patched version (2026.4.2) of pretix/pretix.
The commit 866a5cde4221490be145facf5f167fdae2fe154c, titled "[SECURITY] Add missing session check for cached files (CVE-2026-9712)", contains the security fix.
This commit modifies the file src/pretix/plugins/ticketoutputpdf/api.py. Specifically, it adds a session check to the download method within a ViewSet class (inferred to be TicketOutputPDFViewSet based on convention). Before the patch, this function would fetch and serve a CachedFile based on its ID from the URL, without checking if the requesting user had the right to access it. The patch introduces a call to cf.allowed_for_session() to perform this crucial authorization check.
The render_batch function was also updated to associate the file with the user's session, enabling the new check in download to work correctly. The core of the vulnerability, however, lies in the download function where the access control was missing.