Skip to content
Open redirect Disclosed report Beginner

Ports are not shown in third-party site redirect warning page.

The third-party redirect warning page on Semrush displays only the domain of the destination URL and omits any port number, so a user is shown a warning for example.com while the actual link goes to example.com on a non-standard port. An attacker could use this to send a victim to an unexpected service on the same host, such as a local virtual environment on Android.

b3f53dc9b2061f7df0c2ffd Follow

Originally disclosed on HackerOne

  • Disclosed after 3 months

Summary: [Ports are not shown in third-party site redirect warning page]

Vulnerable Endpoint :- https://www.semrush.com/redirect?urlhttp://example.com:1337

Description: I noticed #311330 this report where you guys fixed a open redirect report by adding a external third-party site redirect warning page . It was a great fix . Although a issue caught in my eye . Urls contains a protocol and Ports . If I add a url with any other ports like 1337 then it's not shown in the external warning page what can be used to take a user to any other place then user expected to go .

Browsers Verified In: Chrome and Mozilla Firefox

Steps To Reproduce:

Visit https://www.semrush.com/redirect?url=http://example.com:1337 You will see a warning page only saying about the domain but no warning about the ports like screenshot added below But the source says it will take user to http://example.com:1337 not only example.com <a href="http://example.com:1337" id="js-site-link" class="site_link" data-test-site-link=""> Go to site </a>

FIX :- I can suggest possible fix here :-

Show the Ports of the inputted url in the Warning page . Thanks

Impact

I noticed in url= parameter many protocols can be used . Like I can use any port and on my android if I visit https://www.semrush.com/redirect?url=http://example.com:1337 and click on Go to site then it will open my virtual environment's.

Attachments

Screenshot_2019-01-18-19-04-59-960_com.android.chrome.png
Screenshot_2019-01-18-19-04-59-960_com.android.chrome.png From the original on HackerOne

The original report as published on HackerOne, by b3f53dc9b2061f7df0c2ffd. 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 extracts and displays only the hostname from the destination URL and does not include the port component.

Impact

A user could be redirected to an unexpected service on the same host, such as a local virtual environment on Android, because the warning does not disclose the port.

What the attacker needed

Victim clicks a crafted redirect link

The fix

The warning page should display the port number of the destination URL alongside the domain.

How it was found

  1. Visit the redirect endpoint with a URL that includes a non-standard port.
  2. Observe that the warning page shows only the domain and no port.
  3. Check the page source to see the link still points to the full URL with the port.

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 warns you before sending you to another site, it should show the full address. Here the warning only shows the domain name and hides the port number, which is like a door number on the same building. So you might think you are going to the normal website but actually land on a different service running on that same computer.

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 from Semrush

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.