Open redirect in Habitica - #VU164354
Published: November 10, 2026
Vulnerability details
The vulnerability allows a remote attacker to redirect users to an attacker-controlled site through Habitica's authentication flow.
The vulnerability exists due to improper redirect target validation in Habitica's sanitizeRedirect function when processing protocol-relative URLs that are subsequently assigned to window.location.href. A remote attacker can trick a user into following a crafted login URL containing redirectTo=//evil.example/attack to cause navigation to an external origin instead of an application path.