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.
- 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:
- 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/
- 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
- Now we combine and get this:
- After this, encode all characters after "https://link.avito.ru/go?to=" and you will get this:
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.
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
- Use a URL-encoding tool with 'Escape All Text Characters' enabled to encode a Google redirect URL containing an example malicious URL.
- Combine the encoded Google redirect with a trusted Google AMP URL to form a new link.
- URL-encode all characters after the 'to=' parameter of the link.avito.ru redirect.
- 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.