Skip to content
Open redirect Disclosed report Intermediate

page.line.me Open Redirect Leading to OAuth Authorization Code Exposure and Access Token Compromise

The page.line.me service accepted redirect destinations outside trusted domains, so an attacker could steer an OAuth 2.0 authorization response to their own endpoint. This could expose the authorization code and let the attacker exchange it for an access token, gaining the victim's privileges.

imnotr3al Follow

Originally disclosed on HackerOne

Bounty$1,000 High 7.1 View original
  • Triaged in 20 days
  • Fixed in 5 months
  • Paid in 5 months
  • Disclosed after 7 months

Summary by the program

An open redirect vulnerability was identified in page.line.me because redirect destinations were not properly restricted to trusted domains. By abusing this behavior within an OAuth 2.0 authorization flow, an attacker could cause the authorization response to be sent to an attacker-controlled endpoint. This could expose the authorization code issued after successful user authentication, which may then be exchanged for a valid access token. As a result, the vulnerability could lead to unauthorized access to the victim’s account, allowing an attacker to perform actions with the victim’s privileges.

The original report as published on HackerOne, by imnotr3al. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target is page.line.me, a host belonging to the LINE Messenger chat asset in the LY Corporation program on HackerOne. The researcher, imnotr3al, reported an open redirect on that host. The program's summary states that redirect destinations on page.line.me were not properly restricted to trusted domains, so the host would send a user to an arbitrary destination supplied in the request.

The interesting part is how the redirect was used. The open redirect was abused within an OAuth 2.0 authorization flow. In that flow the authorization server sends the authorization response, which carries the authorization code, to the redirect URI registered for the client. By abusing the open redirect, an attacker could cause the authorization response to be delivered to an attacker-controlled endpoint.

Step by step, as the summary describes it:

  1. A victim is sent through the OAuth 2.0 authorization flow with the open redirect in play.
  2. The victim authenticates successfully, and the authorization server issues an authorization code.
  3. Because of the open redirect, the authorization response containing that code reaches an endpoint the attacker controls.
  4. The attacker exchanges the code for a valid access token.

The outcome recorded for the report is a high severity rating, a CVSS score of 7.1, and a bounty of 1,000.00 USD. The report was disclosed on 2026-06-02. The summary does not describe the specific request, parameter or payload used, and it does not describe the fix that was applied.

Root cause

The root cause the summary points to is that page.line.me accepted redirect destinations that were not restricted to trusted domains. An open redirect on its own is a low-impact issue, but here it sat inside an OAuth 2.0 flow, so the redirect target influenced where the authorization response was delivered. The summary attributes the issue to redirect destinations on page.line.me not being restricted to trusted domains, which let the authorization response be steered to an attacker-controlled endpoint. The summary does not state which parameter carried the destination or how the redirect was chained into the flow.

Impact

The summary is explicit about the consequence: exposure of the authorization code issued after successful user authentication, which may then be exchanged for a valid access token. With that token, an attacker could gain unauthorised access to the victim's account and perform actions with the victim's privileges. The wording is hedged ("could", "may"), which is appropriate: the impact depends on the victim completing authentication and on the code being usable before it expires or is consumed.

How this kind of bug works

An open redirect exists when an application takes a destination from the request and issues a redirect to it without validating that the destination belongs to an allowed set. Common carriers are query parameters such as next, return, redirect_uri, url or continue, path segments, and form fields used after login. The danger grows when the redirect is reachable from a trusted domain, because users and other systems trust that domain.

OAuth 2.0 makes this worse. The authorization server is supposed to send the authorization response only to a redirect URI that the client registered in advance, and clients are supposed to compare the received URI exactly. If the registered URI is itself an open redirect, or if the client accepts a URI that merely starts with the registered value, the code can be steered elsewhere. Authorization codes are bearer credentials for a short window: whoever holds the code and the client credentials can redeem it for tokens. That is why redirect URI validation is a core part of the OAuth threat model.

Defences are layered: exact-match redirect URI registration, rejecting any redirect target that is not on an allowlist, avoiding redirects to user-supplied absolute URLs entirely (prefer relative paths or server-side mapping), and binding the authorization request to the client with state and PKCE so an intercepted code is harder to redeem.

How to test for it

  1. Map every place the application sends a redirect: login and logout handlers, link shorteners, marketing pages, language and locale switches, and error pages that echo a return URL.
  2. For each candidate parameter, send a request with an external destination you control, for example a host under a domain you own, and observe the Location header and the status code. Try variations: absolute URLs, protocol-relative URLs, values with leading or trailing whitespace, encoded characters, and userinfo tricks such as [redacted].
  3. A positive result is a response that redirects the browser to your external host, not just reflects the value in the body.
  4. To assess OAuth impact, look at how the client builds its authorization request. If the redirect URI or a parameter feeding it can be influenced by the open redirect, walk the flow with a test account and watch where the authorization response lands.

Common false positives: a redirect that only fires after an interstitial warning page, a Location header pointing to a path on the same host, JavaScript-based navigation that is blocked by the browser, or a redirect that only works for authenticated users in a way you cannot reproduce. Confirm the redirect actually leaves the trusted origin before reporting.

How it is fixed

The standard fix is to stop accepting arbitrary destinations. Maintain an allowlist of trusted hosts and paths, and reject anything else, defaulting to a safe internal page. Prefer relative paths over absolute URLs. On the OAuth side, register exact redirect URIs and compare them exactly, reject any mismatch, and use state and PKCE to bind the request to the client. The summary does not state which of these was applied here.

Hunting notes

Open redirects hide in features that exist to move users around: SSO and OAuth callbacks, password reset and email confirmation links, share and invite links, and any "return to where you were" logic. Recon signals include parameters whose names suggest destinations, hosts that proxy to other services, and clients whose registered redirect URI points at a host you can also reach directly. To make the report land, show the full chain: the redirect leaving the trusted origin, the authorization response arriving at your endpoint, and, where the program allows it, redemption of the code with a test account. A bare redirect is often triaged as low; the OAuth context is what turns it into a serious finding.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

This report is about a website called page.line.me, which belongs to LINE Messenger, a chat product run by LY Corporation. A researcher reported a problem on that site through the HackerOne bug bounty platform. A bug bounty programme is a scheme where a company pays people for finding and reporting security flaws in its systems.

The flaw is called an open redirect. To understand it, imagine a receptionist who will walk you to any room you name, without checking whether you are allowed to go there. A website does something similar: when you click a link, the site can answer with a message that says "go to this other address instead". That message is called a redirect. In an open redirect, the site takes the destination address straight from the link and sends you there, even if the destination is a completely different website that the site has no connection with.

On its own, an open redirect sounds harmless. The real damage in this report comes from where the redirect was used: inside an OAuth 2.0 login flow. OAuth 2.0 is the system many apps use so you can log in with an existing account, for example "log in with LINE", without giving the app your password. Here is the rough idea. The app sends you to the login provider. You sign in there. The provider then hands a short-lived code back to the app, and the app swaps that code for an access token, a kind of digital key that lets the app act on your account.

The provider is only supposed to hand the code to an address the app registered in advance, called the redirect URI. The problem was that page.line.me did not properly restrict where its redirects could point. The program's summary says redirect destinations were not limited to trusted domains, so the host would send a user to any destination supplied in the request. By abusing the open redirect within the OAuth flow, an attacker could cause the authorization response, the message carrying the code, to be sent to an attacker-controlled endpoint.

Step by step, as the summary describes it:

  1. A victim is sent through the OAuth 2.0 authorization flow with the open redirect in play.
  2. The victim authenticates successfully, and the authorization server issues an authorization code.
  3. Because of the open redirect, the authorization response containing that code reaches an endpoint the attacker controls.
  4. The attacker exchanges the code for a valid access token.

Why does each step matter? The first step is the trap: the victim only has to follow a link and log in as they normally would. The second step is where trust is granted: the provider believes the login is going to the real app. The third step is the theft: the code, which is meant for the app, lands somewhere else. The fourth step is the payoff: the code is a bearer credential for a short window, meaning whoever holds it can redeem it, so the attacker turns it into a token.

With that token, the summary says, an attacker could gain unauthorised access to the victim's account and perform actions with the victim's privileges. The wording is careful ("could", "may"): the impact depends on the victim completing the login and on the code still being usable before it expires or is used up.

The report was rated high severity with a CVSS score of 7.1. CVSS is a standard scoring system for how serious a vulnerability is. The bounty was 1,000.00 USD, and the report was disclosed on 2026-06-02. The summary does not describe the specific request, parameter or payload used, and it does not describe the fix that was applied.

In general, how this kind of bug works

An open redirect exists when an application takes a destination from the request and redirects to it without checking that the destination is on an allowed list. Common carriers are query parameters, the part of a web address after the ? sign, with names such as next, return, redirect_uri, url or continue. Path segments and form fields used after login can carry them too. The danger grows when the redirect sits on a trusted domain, because users and other systems trust that domain.

OAuth 2.0 makes this worse. The authorization server should send the authorization response only to a redirect URI the app registered in advance, and the app should compare the received URI exactly. If the registered URI is itself an open redirect, or if the app accepts a URI that merely starts with the registered value, the code can be steered elsewhere. That is why redirect URI validation is a core part of the OAuth threat model.

Defences are layered: register exact redirect URIs and compare them exactly, reject any redirect target that is not on an allowlist, avoid redirecting to user-supplied absolute URLs at all (prefer relative paths or a server-side mapping), and bind the authorization request to the client with state and PKCE so an intercepted code is harder to redeem. state is a random value the app sends and checks back, and PKCE is an extra proof step in the exchange.

If you want to test for this yourself, here is the general approach:

  1. Map every place the application sends a redirect: login and logout handlers, link shorteners, marketing pages, language and locale switches, and error pages that echo a return URL.
  2. For each candidate parameter, send a request with an external destination you control, for example a host under a domain you own, and observe the Location header and the status code. The Location header is the part of the server's reply that tells the browser where to go next. Try variations: absolute URLs, protocol-relative URLs, values with leading or trailing whitespace, encoded characters, and userinfo tricks such as [redacted].
  3. A positive result is a response that redirects the browser to your external host, not just reflects the value in the body.
  4. To assess OAuth impact, look at how the client builds its authorization request. If the redirect URI or a parameter feeding it can be influenced by the open redirect, walk the flow with a test account and watch where the authorization response lands.

Watch out for false positives: a redirect that only fires after an interstitial warning page, a Location header pointing to a path on the same host, JavaScript-based navigation that the browser blocks, or a redirect that only works for logged-in users in a way you cannot reproduce. Confirm the redirect actually leaves the trusted origin before reporting.

The standard fix is to stop accepting arbitrary destinations. Keep an allowlist of trusted hosts and paths and reject anything else, defaulting to a safe internal page. Prefer relative paths over absolute URLs. On the OAuth side, register exact redirect URIs and compare them exactly, reject any mismatch, and use state and PKCE to bind the request to the client. The summary does not state which of these was applied here.

Open redirects hide in features built to move users around: single sign-on and OAuth callbacks, password reset and email confirmation links, share and invite links, and any "return to where you were" logic. Signals worth watching include parameter names that suggest destinations, hosts that proxy to other services, and clients whose registered redirect URI points at a host you can also reach directly. To make a report land, show the full chain: the redirect leaving the trusted origin, the authorization response arriving at your endpoint, and, where the programme allows it, redemption of the code with a test account. A bare redirect is often triaged as low; the OAuth context is what turns it into a serious finding.

Glossary

  • Open redirect: a flaw where a site sends the browser to a destination taken from the request without checking it is trusted.
  • Redirect: a server reply telling the browser to load a different address instead.
  • OAuth 2.0: a standard that lets an app get limited access to your account on another service without your password.
  • Authorization code: a short-lived code the login provider gives the app, which the app swaps for a token.
  • Access token: a digital key that lets the holder act on an account.
  • Bearer credential: a secret that anyone holding it can use, with no further proof of identity.
  • Redirect URI: the address an app registers in advance to receive the authorization response.
  • Authorization response: the message the provider sends back after login, carrying the code.
  • Endpoint: a specific address on a server that accepts requests.
  • Query parameter: the part of a web address after ?, made of name and value pairs.
  • Location header: the part of a server reply that names where the browser should go next.
  • Allowlist: a list of values that are explicitly permitted, with everything else rejected.
  • CVSS: a standard scoring system for the severity of a vulnerability.
  • Bug bounty programme: a scheme where a company pays researchers for reporting security flaws.
  • state: a random value an app sends with an authorization request and checks on return, to tie the two together.
  • PKCE: an extra proof step in the OAuth code exchange that makes a stolen code harder to redeem.
  • False positive: a finding that looks like a vulnerability but is not actually exploitable.

More by imnotr3al

View all

1 more disclosed report, best first.

More from LY Corporation

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.