In the browser, click the SVG thumbnail. This navigates directly to /uploads/ID. The server responds with Content-Type: image/svg+xml on the same origin — the browser parses it as XML and executes the script.
Output
Alert popup showing the gallery_session cookie with the flag.
⚑ This only works because the file is served from the same origin. If it were on a CDN subdomain, same-origin policy would block cookie access.