VYPR
Low severityNVD Advisory· Published May 27, 2026

CVE-2026-9712

CVE-2026-9712

Description

When creating an export through the pretix API, API clients are returned an UUID value for their export job (a long, random string like 35742818-c375-4d15-839f-d49aecce94d6). Using this UUID, the API client can then request the actual file for download. The same kind of UUID is used in other places in pretix when temporary files are generated for internal use or download.

One remaining API endpoint, however, wrongfully did not verify if the UUID used for download actually belongs to a file that is supposed to be downloadable and belongs to the correct user. In reality, this is hard to exploit because an attacker would need to have access to a valid UUID for the file they desire which is unlikely to happen without a separate security problem giving them access to logs etc.

Affected products

2

Patches

1
7b9d095f4e2b

[SECURITY] Add missing session check for cached files (CVE-2026-9712)

https://github.com/pretix/pretixRaphael MichelMay 27, 2026via github-commit-search
1 file changed · +6 0
  • src/pretix/plugins/ticketoutputpdf/api.py+6 0 modified
    @@ -229,6 +229,11 @@ def destroy(self, request, *args, **kwargs):
         @action(detail=False, methods=['GET'], url_name='download', url_path='download/(?P<asyncid>[^/]+)/(?P<cfid>[^/]+)')
         def download(self, *args, **kwargs):
             cf = get_object_or_404(CachedFile, id=kwargs['cfid'])
    +        if not cf.allowed_for_session(self.request, "ticketoutputpdf-api"):
    +            return Response(
    +                {'status': 'failed', 'message': 'Unknown file ID or export failed'},
    +                status=status.HTTP_410_GONE
    +            )
             if cf.file:
                 resp = ChunkBasedFileResponse(cf.file.file, content_type=cf.type)
                 resp['Content-Disposition'] = 'attachment; filename="{}"'.format(cf.filename).encode("ascii", "ignore")
    @@ -265,6 +270,7 @@ def render_batch(self, *args, **kwargs):
             serializer.is_valid(raise_exception=True)
     
             cf = CachedFile(web_download=False)
    +        cf.bind_to_session(self.request, "ticketoutputpdf-api")
             cf.date = now()
             cf.expires = now() + timedelta(hours=24)
             cf.save()
    

Vulnerability mechanics

Root cause

"Missing session authorization check in the download endpoint allows any user who knows a cached file's UUID to retrieve it."

Attack vector

An attacker who obtains a valid UUID of a cached file (e.g., from logs, error messages, or another information leak) can call the download endpoint with that UUID to retrieve a file that was not intended for them. The endpoint did not verify that the UUID belonged to a file downloadable by the current user or session [patch_id=2694039]. In practice, exploitation requires the attacker to first acquire a valid file UUID through a separate information disclosure.

Affected code

The vulnerability is in the `download` action of the ticket output PDF API at `src/pretix/plugins/ticketoutputpdf/api.py`. The endpoint retrieves a `CachedFile` by its ID but previously performed no authorization check to verify the file belonged to the requesting user or session [patch_id=2694039].

What the fix does

The patch adds a call to `cf.allowed_for_session(self.request, "ticketoutputpdf-api")` in the `download` method, which returns a 410 Gone response if the cached file is not bound to the current session [patch_id=2694039]. It also adds `cf.bind_to_session(self.request, "ticketoutputpdf-api")` when creating a new `CachedFile` in `render_batch`, ensuring that files are properly associated with the session that created them [patch_id=2694039]. This closes the authorization gap by enforcing that only the session that generated a cached file can later download it.

Preconditions

  • inputAttacker must obtain a valid UUID of a cached file belonging to another user (e.g., through log access, error messages, or another information leak)
  • configThe target file must still exist and not have expired on the server

Generated on May 27, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

1

News mentions

0

No linked articles in our index yet.