Skip to content
Open redirect Disclosed report Intermediate

Wrong Interpretation of URL encoded characters, showing different punny code leads to redirection on different domain

The unsafe-link warning page on Twitter displayed a link as twitter.com while the continue button actually sent the user to a different domain, because bidirectional and invisible Unicode characters in the URL were interpreted differently by the warning page and the redirect. An attacker could use this to make a malicious link look safe in the warning and then redirect the victim elsewhere.

mr_edwards Follow

Originally disclosed on HackerOne

Bounty$560 Low View original
  • Triaged in 4 days
  • Fixed in 43 days
  • Paid in 8 days
  • Disclosed after 53 days

##Summary: There is wrong interpretation of URL encoded characters at https://twitter.com/safety/unsafe_link_warning endpoint which could lead to different location then what is supposed to.

Although it shows warning but doesn't show warning about punny code characters.

##Description: On following characters:

%E2%80%AE - RTLO Character
%E2%80%8E - LEFT-TO-RIGHT MARK
%E2%80%91 - Non breaking hyphen
%E2%80%A9 - PARAGRAPH SEPARATOR
%E2%80%AA 0 Right-to-left embedding

Interpretation of these characters is different but when we click continue button it will redirect you to some other location.

Steps To Reproduce:

  1. Go to following URL: https://twitter.com/safety/unsafe_link_warning?unsafe_link=https%3A%2F%2F%E2%80%AEmoc.rettiwt
  2. You will see that its showing : https://twitter.com
Screenshot_from_2019-06-21_15-13-58.png
Screenshot_from_2019-06-21_15-13-58.png From the original on HackerOne

But originally you will be redirected to https://xn--moc-4t7s.rettiwt/ when you click continue button.

##Argument:

But it is not possible to have TLD 'rettiwt'.

  • counter:

We can have URL as follows:

https://twitter.com/safety/unsafe_link_warning?unsafe_link=https%3A%2F%2F%E2%80%AEmoc.rettiwt.com
Screenshot_from_2019-07-02_09-18-24.png
Screenshot_from_2019-07-02_09-18-24.png From the original on HackerOne

Supporting Material/References:

  • screenshots.

Impact

Wrong location redirection.

The original report as published on HackerOne, by mr_edwards. 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 warning page rendered the URL without normalising or stripping bidirectional and invisible Unicode characters, so the displayed link differed from the link used for the redirect.

Impact

A victim could be redirected to an unexpected domain despite the warning page showing a trusted-looking address.

What the attacker needed

Victim clicks a crafted warning link; victim clicks continue

How it was found

  1. Open the unsafe_link_warning page with a crafted unsafe_link parameter containing a bidirectional override character.
  2. Observe that the page displays the link as twitter.com.
  3. Click the continue button and note the redirect goes to a different 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.

Some Unicode characters are invisible or change the order text is displayed in, so a web address can look like one thing on screen but be a different address underneath. Here the warning page showed the safe-looking address while the continue button used the real, hidden one. An attacker could abuse this to trick someone into visiting a site they did not expect.

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 mr_edwards

View all

3 more disclosed reports, best first.

More from X / xAI

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.