How I Bypassed open redirect and i have get reward from yandex
Mohamed Lakhdar Metidji Follow
Published on medium.com
i will share with you about bug โ open redirect โ This vulnerability is known to everyone, but what I wanted to show you how i bypassed open-redirect
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Yandex Money (money.yandex.ru) exposes a search page that takes a user-supplied text parameter. The researcher found that this parameter is used as a redirect target: the application does not check the value passed by the user, so a crafted value sends the browser to an external site. That is a classic open redirect.
The write-up is short and its purpose is narrow: not to introduce open redirects, which the author says everyone knows, but to show the payload that got past the obvious filter. The report was submitted to Yandex, paid a 100 USD reward, and the researcher was added to the hall of fame in 06/2020.
Setup
No accounts, roles, tools or versions are described. The only precondition is access to the public search endpoint on money.yandex.ru and a browser to follow the redirect. The author tested the parameter directly in the URL.
Finding it
The starting point is the search endpoint with the text parameter:
https://money.yandex.ru/search?text=
The author states the open redirect exists because the application does not check the value passed by the user to the site parameter, although every URL shown uses text. The parameter actually shown in every URL in the report is text, so the naming in the text and in the examples does not match; the payloads were all delivered through text.
The obvious test, appending an external host directly to the parameter, did not work:
https://money.yandex.ru/search?text=evil.com
A second attempt, passing a full URL as the value, is also described:
https://money.yandex.ru/search?text=https://evil.com/
The bare host did not produce the redirect, but the full URL did.
Exploitation
Step 1: craft a value that survives the check
The payload that worked was:
///[redacted]
Delivered in full as:
https://money.yandex.ru/search?text=///[redacted]
The value begins with /// and contains an @, which the article suggests may explain why it worked. The @ separates userinfo from the host in URL syntax, so a parser that reads the part after @ as the authority resolves the destination to evil.com, while the text before it (www.x.com) is only userinfo. The value therefore reads as a relative-looking path to one check and as an external host to the browser.
Step 2: observe the redirect
After the request, the page redirected to:
http://www.evil.com
That is the confirmation of the open redirect: the browser left money.yandex.ru and landed on the attacker-controlled host.

The image sits at the end of the report next to the note that a proof-of-concept video is available and that the researcher received the hall of fame entry in 06/2020.
Step 3: report
The researcher reported the behaviour to Yandex and received a 100 USD reward, plus a hall of fame entry in 06/2020.
Root cause
The application takes the user-controlled text value and uses it as a redirect destination without validating that the result stays on an allowed host. The report does not show the validation logic, so the precise reason the payload worked is not known. The report does not show the server-side code, so the precise validation logic is not known; the bypass mechanism above is the likely explanation for why the first two payloads failed and this one succeeded.
Impact
An attacker can craft a money.yandex.ru link that sends a victim to an arbitrary external site after the victim clicks it. The link starts on the legitimate Yandex Money domain.
Fix
The general remedy for this class is to stop accepting arbitrary destinations: allow only relative paths or an explicit allowlist of hosts, resolve and normalise the value with a proper URL parser before comparing it against that allowlist, and reject values whose parsed host is not permitted, including those that rely on userinfo, extra slashes or scheme-relative forms.
Variants to test
These are patterns worth trying wherever a parameter is used as a redirect target. A positive result is the browser leaving the original host for the host you control.
- Userinfo with extra slashes, as here:
///[redacted]. Positive result: the address bar ends onattacker.example. - Scheme-relative form:
//attacker.example. Positive result: redirect toattacker.exampleover the current scheme. - Backslash variants:
\\attacker.exampleand/\attacker.example. Positive result: browsers that normalise backslashes to slashes follow the redirect off-site. - Encoded separators:
%2f%2fattacker.exampleand%5c%5cattacker.example. Positive result: the value is decoded after the check and the redirect goes external. - Absolute URL with a trusted-looking prefix:
https://[redacted]. Positive result: the parsed host isattacker.example. - Path traversal into a redirect:
/redirect?url=/../\attacker.example. Positive result: normalisation collapses the path and the destination becomes external. - Whitespace and control characters before the host: a leading space, tab or newline before
//attacker.example. Positive result: the check trims or ignores the prefix but the browser still parses an external authority.
What happened, in plain words
A security researcher found a way to make a page on Yandex Money (the Russian payment service at money.yandex.ru) send visitors to a website of the attacker's choosing. This kind of flaw is called an open redirect: the site takes a value from the address bar and uses it as the place to send you next, without checking that the destination is one of its own pages. Because the link starts with the trusted money.yandex.ru address, a victim is much more likely to click it than a raw link to a strange site.
The interesting part of this write-up is not the flaw itself, which the author says is well known, but the trick that got past the site's attempt to block it. A bare host name did not work, but a specially crafted value succeeded, the browser ended up on the attacker's host, and Yandex paid a 100 USD reward and added the researcher to its hall of fame in 06/2020.
The product and the feature
Yandex Money is an online payment service. Its site has a search page: you type something into a search box, the site puts your text into the address bar as a parameter, and the page shows results. A parameter is the part of a web address after the question mark. In https://money.yandex.ru/search?text=hello, the parameter is named text and its value is hello. The server reads that value and decides what to do with it.
In this case the server did more than search: it also used the value as a destination to redirect to. A redirect is what happens when a web page answers your request not with content but with an instruction to your browser: "go to this other address instead". You see the address bar change and a new page load. Redirects are normal and useful, for example after you log in, but they become dangerous when the destination comes from the user and is not checked.
Setting up
There is nothing to install. The author needed only a browser and access to the public search page on money.yandex.ru. No account, no special tool and no particular software version is mentioned. All testing was done by typing values directly into the address bar.
Finding it
The starting point is the search page with its text parameter:
https://money.yandex.ru/search?text=
Line by line: https:// says the connection is encrypted; money.yandex.ru is the site's host name; /search is the page; ?text= starts the parameter list, with the parameter named text and an empty value waiting to be filled in.
The author writes that the redirect exists because the application does not check the value the user passes to the site parameter. Every address shown in the report, however, uses text, so the payloads all travelled through text.
The first, obvious test was to put an outside website straight into the parameter:
https://money.yandex.ru/search?text=evil.com
Line by line: the same search page, but now the value of text is evil.com, a host name that is not Yandex's. If the site blindly redirected to whatever it was given, the browser would leave for evil.com. It did not work.
A second attempt passed a complete web address as the value:
https://money.yandex.ru/search?text=https://evil.com/
Line by line: this time the value of text is itself a full URL, https://evil.com/, including its own https:// and trailing slash. This payload worked.
So something in the way the site handled the value refused a plain host name. The author's next step was to find a value that looks harmless to that check but still means "go to evil.com" to the browser.
The trick that worked
The payload that succeeded was:
///[redacted]
Line by line: it begins with three forward slashes, then a host-looking name www.x.com, then an @ sign, then the real destination evil.com. To a person it looks like a path with an odd name in it. To a browser it means something quite different, as explained below.
Delivered in full, the request was:
https://money.yandex.ru/search?text=///[redacted]
Line by line: the search page on money.yandex.ru, with text set to the crafted value. The browser sends this to Yandex; Yandex reads the value and answers with a redirect; the browser follows it.
Two details in the value may explain it:
- The leading
///makes the string start like a path rather than like a complete address. A simple check that looks forhttp://orhttps://at the start, or that treats anything not starting with a scheme as a local path, sees nothing external and lets it through. - The
@sign has a special meaning in web addresses. Inhttps://user:password@host/, everything before the@is login information (called userinfo) and everything after it is the real host. So a browser reading///[redacted]treatswww.x.comas userinfo andevil.comas the host it must connect to. A naive string check seeswww.x.comand thinks the destination is fine; the browser seesevil.com.
The value may read as a harmless relative path to one piece of code and as an external host to the browser.
Watching the redirect
After the request, the page redirected to:
http://www.evil.com
Line by line: http:// is the unencrypted web protocol, www.evil.com is the attacker-controlled host, and the trailing slash is the site's root page. The browser has left money.yandex.ru and landed on a site the attacker chose. That is the proof of the open redirect.

The image sits at the end of the report, next to the author's note that a proof-of-concept video is available and that the hall of fame entry came in 06/2020.
Reporting it
The researcher reported the behaviour to Yandex. Yandex paid a 100 USD reward and added the researcher to its hall of fame in 06/2020. A bug bounty is a programme in which a company invites people to report security flaws and pays for good ones; a hall of fame is the public list of researchers who have done so.
Why it happens
The site takes a value the user controls and uses it as a redirect destination without checking that the result stays on an allowed host. The report does not show the validation logic, so the exact reason the payload worked is unknown. The report does not show the server-side code, so the exact validation logic is unknown; the mechanism above is the likely reason the first two payloads failed and this one succeeded.
What an attacker could do with it
An attacker can build a money.yandex.ru link that sends a victim to any external site after a click. The link begins on the legitimate Yandex Money domain. Phishing is the practice of luring someone to a fake page, usually to steal a password or payment details.
How to fix it
The general remedy for this class of flaw is to stop accepting arbitrary destinations: allow only relative paths or an explicit list of permitted hosts (an allowlist), resolve and normalise the value with a proper URL parser before comparing it against that list, and reject any value whose parsed host is not permitted, including those that rely on userinfo, extra slashes or scheme-relative forms.
Variants worth trying
These are patterns to test wherever a parameter is used as a redirect target. A positive result is the browser leaving the original host for a host you control.
- Userinfo with extra slashes, as here:
///[redacted]. Positive result: the address bar ends onattacker.example. - Scheme-relative form:
//attacker.example. Positive result: redirect toattacker.exampleover the current scheme. - Backslash variants:
\\attacker.exampleand/\attacker.example. Positive result: browsers that normalise backslashes to slashes follow the redirect off-site. - Encoded separators:
%2f%2fattacker.exampleand%5c%5cattacker.example. Positive result: the value is decoded after the check and the redirect goes external. - Absolute URL with a trusted-looking prefix:
https://[redacted]. Positive result: the parsed host isattacker.example. - Path traversal into a redirect:
/redirect?url=/../\attacker.example. Positive result: normalisation collapses the path and the destination becomes external. - Whitespace and control characters before the host: a leading space, tab or newline before
//attacker.example. Positive result: the check trims or ignores the prefix but the browser still parses an external authority.
Glossary
- Open redirect: a flaw where a site sends visitors to an address supplied by the user, without checking that the destination is allowed.
- Parameter: the part of a web address after the question mark, made of a name and a value, such as
text=hello. - Redirect: an instruction from a server telling the browser to load a different address instead.
- Host: the part of a web address that names the server, such as
money.yandex.ruorevil.com. - URL: a web address, made of a scheme, a host, a path and optional parameters.
- Scheme: the first part of a URL, such as
https://orhttp://, which says how to connect. - Userinfo: the optional login part of a URL before an
@sign; browsers ignore it when deciding which host to contact. - Payload: the crafted value an attacker sends to trigger a flaw.
- Normalise: to rewrite a value into a standard form so that two spellings of the same thing compare equal.
- Allowlist: an explicit list of values that are permitted, with everything else rejected.
- Bug bounty: a programme that pays researchers for reporting security flaws.
- Hall of fame: a public list of researchers credited by a company.
- Phishing: tricking someone into visiting a fake page, usually to steal credentials or payment details.
- Proof of concept (PoC): a demonstration, often a video or screenshots, showing that a flaw can really be triggered.
- Scheme-relative URL: an address starting with
//that borrows the current page's scheme. - Path traversal: using
..and slashes to climb out of an intended directory or path. - Encoded separator: a slash or backslash written as
%2for%5cso that a check may miss it before decoding.