hard20 pts · first answer countsweb-securityauthentication
Redirect check that can be bypassed
After login the app redirects to the next query parameter, only if it starts with "/". An attacker sends victims a login link with ?next=//evil.example/login. What happens?
const next = searchParams.get('next') ?? '/'
if (next.startsWith('/')) {
redirect(next)
}Discussion 0
Join free to post in the discussion.
Related questions
- Storing user passwordsFull Stack Developer
- What HttpOnly doesFull Stack Developer
- What HTTPS protectsFull Stack Developer
- Caching a bank statement pageFull Stack Developer
- JWT in localStorageFull Stack Developer
- CSRF with cookie sessionsFull Stack Developer
- Users see each other’s profileFull Stack Developer
- User bios rendered as HTMLFull Stack Developer