# Gatewright — Open Redirect (lab)

> Gatewright is a single sign-on portal that returns you to a "next" URL after login. It only means to allow its own site, but the check is sloppy.

Canonical: https://codelivly.com/labs/open-redirect

| | |
|---|---|
| Type | Web |
| Difficulty | Beginner |
| Points | 150 |
| Session length | 30 min |
| Completions | 23 |

Gatewright is a single sign-on portal that returns you to a "next" URL after login. It only means to allow its own site, but the check is sloppy. Craft a next URL that passes Gatewright's allow-list yet sends users to a site you control — the flag is your proof the redirect escaped.

## Objective

Learn open redirect: when a site redirects to a user-supplied URL and validates it with a weak check, an attacker can send victims to an external site of their choosing (to phish or steal a token) from a link that looks like it belongs to the trusted site.

## Tasks

1. See how the redirect works
2. Try a safe target
3. Find the gap in the check
4. Escape the site
5. Capture the flag

## Related

- [All labs](https://codelivly.com/practice?type=lab)
