How I Hijacked an Instagram Account and Discovered Open Redirection Vulnerabilities
A company's footer linked to an Instagram handle that did not exist, so anyone could register that handle and have the site's visitors sent to their profile. Two subdomains also accepted a return URL parameter on login and signup pages and redirected users to an attacker-chosen site after authentication.
josekuttykunnelthazhebinu Follow
Published on medium.com
Today, Iām bringing you something new and interesting. This is not a typical bug bounty article; instead, Iām going to share some security loopholes I came across during penetration testing as part of my day job.
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
Likely the site trusted an unclaimed external social media handle and passed user-supplied return URL parameters to redirects without validating the destination.
Impact
Visitors following the site's own social link could be sent to an attacker-controlled profile, and users completing login or signup could be redirected to an attacker-chosen site, which could be used for phishing.
What the attacker needed
Attacker registers the unclaimed handle; victim clicks the site's social link; victim logs in or signs up via crafted link
How it was found
- Enumerate the target's subdomains and browse them for embedded links.
- Notice the footer Instagram logo points to a profile that does not exist.
- Register an Instagram account with that same username.
- Revisit the subdomain and click the logo to confirm the redirect.
- Find login and signup pages that accept a return URL parameter.
- Add an external site to the parameter, then log in or register to trigger the redirect.
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.
A website can link to a social media profile that nobody has claimed yet. If an attacker registers that name first, the site's own link now points at the attacker's page. Separately, some pages take a 'where to go next' address from the URL, and if they do not check it, they will send a logged-in user to any site the attacker names.
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.