Bypass the fix of report #1078283 due to poor validation
The URL validation on the 'continue' parameter only checked for the presence of 'khanacademy.org' without proper boundary checking, allowing an attacker to use a domain like 'khanacademy.orghacker.com.br' to redirect victims to a controlled site. This enables phishing attacks and potential chaining with other vulnerabilities.
Originally disclosed on HackerOne
- Triaged in 4 days
- Fixed in 11 days
- Disclosed after 41 days
Hi Khan Academy Team,
I was able to bypass the fix you implemented for report #1078283.
The URL validation you implemented on the endpoint continue checks the presence of khanacademy.org however it doesn't have any boundary checking to ignore domains starting with .org, so if an attacker register a domain starting with org like this one orghacker.com.br and have a subdomain entry of khanacademy the attacker is able to bypass the current implementation and lead the victim to his controlled page.
Steps to reproduce the issue
- Go to this page https://www.khanacademy.org/signup?isteacher=1&referral=LearnStorm&continue=https://khanacademy.orghacker.com.br
- You'll be redirected to
orghacker.com.brwhich is not a domain that Khan Academy owns
Impact
Bypass of current URL validation. Attacker can send a phishing campaign and redirect the request to a server of his control. An attacker might chain the attack to other types of attack too.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the validation used a simple substring check for 'khanacademy.org' instead of verifying the exact domain or using a proper allowlist with boundary checks.
Impact
An attacker could conduct phishing campaigns by redirecting victims to a server they control, and might chain this with other attacks.
What the attacker needed
Victim clicks a crafted link
The fix
The validation should be fixed by parsing the URL and checking the hostname against an allowed domain rather than a substring match.
How it was found
- Visit the signup page with the crafted 'continue' parameter pointing to a malicious domain.
- Observe that the browser is redirected to the attacker-controlled domain.
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 report has not been written yet. The Original tab links to the source.
When a website redirects you to another page, it should only send you to trusted sites. Here, the check was too loose: it just looked for the text 'khanacademy.org' anywhere in the address, so an attacker could craft a domain like 'khanacademy.orghacker.com.br' that contains that text but actually belongs to them. This lets attackers trick users into visiting fake pages that look legitimate.
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.