RTL override char allowed at khanacademy redirect page
The Khan Academy link redirector page did not filter the right-to-left override character in the URL parameter, allowing an attacker to make a malicious executable appear as a harmless image file. An attacker could also use malformed URLs to spoof the domain shown in the link.
- Disclosed after 21 days
##Summary
Attacker can embed RTLO character at the following URL https://www.khanacademy.org/computer-programming/link_redirector?url= to trick the user to download suspicious files.
##Steps to reproduce
- Visit https://www.khanacademy.org/computer-programming/link_redirector?url=
- add the following payload to the url parameter
https://example.com/so%E2%80%AEgnp.exe
- After visiting the URL you will see the following link appearing on the page, which appears to be a link to a png file.

- Click on the link and you will be redirected to an executable file.

##Additional Payloads
Attacker can even spoof the domain name by adding the following value to the url parameter
https://google.com@%E2%80%[email protected]

When the user will click on the link the user will be redirected to https://moc.rettiwt/ which is a completely different host.
I have also tested some other malformed URLs which can fool user to redirect to other hosts
https://google.com@"twitter.com
https://google.com@'twitter.com
https://google.com@/twitter.com
https://google.com@'#twitter.com (Different domain)
##Mitigation
Filter out all the unnecessary special symbols from the URL along with the RTLO char.
##References #299403 #298 RIGHT TO LEFT OVERRIDE
Impact
- This can be used to spoof URLs on khanacademy.
- can be used to fool users to download malicious files.
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 redirect page did not sanitise or validate the URL parameter, allowing special Unicode characters and malformed URLs to be displayed and used for redirection.
Impact
This could be used to spoof URLs on Khan Academy and to fool users into downloading malicious files.
What the attacker needed
Victim clicks a crafted link
How it was found
- Visit the Khan Academy link redirector page.
- Add a URL containing the right-to-left override character to the url parameter.
- Observe that the displayed link appears to point to a PNG file.
- Click the link and get redirected to an executable file.
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.
A right-to-left override is a special character that reverses the order of text after it. By putting this character in a link, an attacker can make a file ending in .exe look like it ends in .png, so users think they are downloading a picture but get a program. The redirect page also accepted malformed web addresses that could make a link appear to point to a trusted site while actually going elsewhere.
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.