Executive brief
Immich, a self-hosted photo and video management platform, contains a vulnerability that allows an attacker to take over a user's account if the user clicks a malicious link. By tricking a logged-in user into clicking a specially crafted URL, an attacker can execute commands in the user's browser to steal access keys. This gives the attacker full, persistent access to the victim's photos, videos, and account settings, even if the victim later changes their password.
Technical details
A reflected cross-site scripting (XSS) vulnerability exists in the `/auth/login` and `/auth/pin-prompt` routes of Immich. The application reads the `continue` query parameter and passes it directly to SvelteKit's `redirect()` function without validating the URI scheme or origin. An attacker can provide a `javascript:` URI which, when executed in the context of the victim's authenticated session, can perform API requests to generate a new, all-permission API key. This key provides persistent access that survives password changes and session expiration. The issue was introduced in commit 4ffa26c9 and fixed in commit 4eb1003 by ensuring the redirect URL is a relative path starting with a single forward slash.
Affected products
- immich-app immich-server main@4ffa26c9 to main@4eb1003
Timeline
- 2026-04-15: other: Vulnerability introduced in PR #27831
- 2026-06-01: advisory: GitHub Security Advisory published
- 2026-06-23: disclosed: CVE published to NVD
- 2026-06-23: patched: Fix committed to main branch