Skip to content
Open redirect Disclosed report Intermediate

link.avito.ru - Bypass of restrictions on external links.

The link.avito.ru redirector allowed bypassing its warning for untrusted external links by using a trusted domain (google.com) and double URL-encoding. An attacker could redirect users to a malicious site without the safety warning.

hen51 Follow

Originally disclosed on HackerOne

Medium 4.4 View original
  • Triaged in 11 hours
  • Fixed in 12 months
  • Disclosed after 13 months

Hello Avito!

On "link.avito.ru" subdomain of "www.avito.ru" attacker able to bypass restriction for dangerous external links via trusted domain google.com.

This scenario may be also possible with all other trusted subdomains of avito such as "yandex.ru" and so on, but in this example i'm used google redirect functionality "google.com/url?sa=t&url=" .

Example with TRUSTED subdomain: https://link.avito.ru/go?to=youtu.be/dQw4w9WgXcQ

But we will dig deeper because there are not much to play with.

By default when user visit's untrusted link from avito.ru he or she can face with the warning webpage which tells user about the danger but sadly this restriction can be bypassed. I will show you how.

Firstly we will use this link: https://link.avito.ru/go?to=http://google.com/amp/

Then we need to add this part to previous link: google.com/url?sa=t&url=HTTP%3A%2F%2Fexample.com/

But this shouldn't work with avito.ru until we url-encode this.

Steps to reproduce:

  1. For our needs we will use "https://onlinetexttools.com/url-encode-text" website. Make sure you enabled 'Escape All Text Characters' option.

Paste this link into "Text" field: google.com/url?sa=t&url=HTTP%3A%2F%2Fexample.com/

  1. After url-encode we will get this value:

%67%6F%6F%67%6C%65%2E%63%6F%6D%2F%75%72%6C%3F%73%61%3D%74%26%75%72%6C%3D%48%54%54%50%25%33%41%25%32%46%25%32%46%65%78%61%6D%70%6C%65%2E%63%6F%6D%2F

  1. Now we combine and get this:

https://link.avito.ru/go?to=http://google.com/amp/%67%6F%6F%67%6C%65%2E%63%6F%6D%2F%75%72%6C%3F%73%61%3D%74%26%75%72%6C%3D%48%54%54%50%25%33%41%25%32%46%25%32%46%65%78%61%6D%70%6C%65%2E%63%6F%6D%2F

  1. After this, encode all characters after "https://link.avito.ru/go?to=" and you will get this:

https://link.avito.ru/go?to=%68%74%74%70%3A%2F%2F%67%6F%6F%67%6C%65%2E%63%6F%6D%2F%61%6D%70%2F%25%36%37%25%36%46%25%36%46%25%36%37%25%36%43%25%36%35%25%32%45%25%36%33%25%36%46%25%36%44%25%32%46%25%37%35%25%37%32%25%36%43%25%33%46%25%37%33%25%36%31%25%33%44%25%37%34%25%32%36%25%37%35%25%37%32%25%36%43%25%33%44%25%34%38%25%35%34%25%35%34%25%35%30%25%32%35%25%33%33%25%34%31%25%32%35%25%33%32%25%34%36%25%32%35%25%33%32%25%34%36%25%36%35%25%37%38%25%36%31%25%36%44%25%37%30%25%36%43%25%36%35%25%32%45%25%36%33%25%36%46%25%36%44%25%32%46

Instead of notifying user about the danger, the user is redirected outside of avito.ru to google.com.

Impact

An attacker can redirect the target from "link.avito.ru" to malicious website through trusted website google.com and his redirect functionality.

The original report as published on HackerOne, by hen51. 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 redirector only checked the initial domain against a trusted list and did not properly decode or validate nested redirects, allowing a trusted domain to act as an open redirect.

Impact

An attacker could redirect users from link.avito.ru to a malicious website via a trusted site's redirect, bypassing the safety warning.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Use a URL-encoding tool with 'Escape All Text Characters' enabled to encode a Google redirect URL containing an example malicious URL.
  2. Combine the encoded Google redirect with a trusted Google AMP URL to form a new link.
  3. URL-encode all characters after the 'to=' parameter of the link.avito.ru redirect.
  4. Visit the final crafted link, which redirects to google.com instead of showing a warning.

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 website had a redirect service that normally shows a warning before sending you to an untrusted site. By crafting a special link that used a trusted site (Google) and encoding it in a tricky way, the warning could be skipped, so you'd go straight to a harmful site.

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 Avito

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.