Skip to content
Open redirect Disclosed report Beginner

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.

d3f4u17 Follow

Originally disclosed on HackerOne

  • 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

https://www.khanacademy.org/computer-programming/link_redirector?url=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.
rtlo.png
rtlo.png From the original on HackerOne
  • Click on the link and you will be redirected to an executable file.
rtlo2.png
rtlo2.png From the original on HackerOne

##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]

rtlo3.png
rtlo3.png From the original on HackerOne

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.

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

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

  1. Visit the Khan Academy link redirector page.
  2. Add a URL containing the right-to-left override character to the url parameter.
  3. Observe that the displayed link appears to point to a PNG file.
  4. 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.

More by d3f4u17

View all

8 more disclosed reports, best first.

More from Khan Academy

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.