Skip to content
Open redirect Write-up Beginner

Turning a Login Redirect Into a Backdoor Into OopsSec Store’s Internals

The login page's redirect parameter was not validated, allowing an attacker to redirect users to any external URL. By setting the redirect to an internal OAuth callback page, the attacker could also trigger the setting of a required cookie and access that otherwise gated page.

oopssec-store Follow

Published on medium.com

You’re going to abuse an unvalidated redirect parameter on OopsSec Store's login page to reach an internal OAuth callback endpoint that's supposed to be off-limits. The bug is a classic open redirect (CWE-601).

OopsSec Store, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The application used the user-controlled redirect parameter directly in window.location.href without validating that the target was a safe, same-origin path.

Impact

An attacker could redirect users to malicious sites for phishing or token theft, and could bypass access controls to reach internal pages that were meant to be gated.

What the attacker needed

A free account; victim clicks a link; none

The fix

Validate the redirect target by allowing only relative same-origin paths, comparing origins, or using an allowlist, and prefer router.push over window.location.href.

How it was found

  1. Visit a protected page like /profile while logged out to see the login URL with a redirect parameter.
  2. Log in with valid credentials and observe that you are redirected to the specified path.
  3. Change the redirect parameter to an external URL and log in to confirm the open redirect.
  4. Discover the internal /internal/oauth/callback page, which is normally inaccessible.
  5. Set the redirect parameter to /internal/oauth/callback and log in to access the page and retrieve the flag.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An open redirect is when a website lets you specify where to go next, and it blindly trusts that input. Here, the login page used a 'redirect' parameter to send you to a page after logging in, but it didn't check if the destination was safe. An attacker could use this to send you to a malicious site, or in this case, to sneak into a hidden internal page that was supposed to be off-limits.

What is Open redirect?

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

More by oopssec-store

View all

2 more disclosed reports, best first.

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.