Open Redirection leads to redirect Users to malicious website
A parameter in the account verification link was used to build a redirect without checking the destination, so an attacker could send a logged-in user to an arbitrary site. The author also claims script execution on the destination, but the text does not show how that follows from the redirect.
- Fixed in 17 days
- Paid in 17 days
- Disclosed after 10 months
Summary
I found an open redirect bug on unikoingold.com .First, I create an account on unikoingold.com , I fill all the forms with the required information (First name,Birth,etc...), until I came on the final step to verify my account , there was a mechanism to send a verification link to my email , therefore ,I open my email an click to this LINK to confirm my account and using burp suite proxy to see what traffic is passed into this request so I came over this url https://unikrn.com//s/doi?h=maafad1d6d_cb9789f50190531e43c7409eeead93ff1a7e21ff&l=//[email protected]/../&utm_medium=doi&utm_campaign=doi_welcome then I try to play with l parametre until I have redirection to my input (Malicious website with XSS code executed).
Steps
- Create An account on unikoingold.com .
- Set up your Burp suite proxy with your browser .
- Intercept the request Like This :
GET /s/doi?h=maafad1d6d_cb9789f50190531e43c7409eeead93ff1a7e21ff&l=//[email protected]/%2e%2e%2f&utm_medium=doi&utm_campaign=doi_welcome HTTP/1.1
Host: unikrn.com
Connection: close
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Encoding: gzip, deflate
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=dc2e81d88677939ce456f73a18c2a09b51561192429; CW=fplg5rn6s118blhgpb20hi0phlhuv4jr
4 . Note the Value of l parametre
5 . Or just Click on this URL POC You must be logged in
6 . Redirected successfully and Javascript code Executed .
##POC
-
https://unikrn.com//s/doi?h=maafad1d6d_cb9789f50190531e43c7409eeead93ff1a7e21ff&l=//[email protected]/../&utm_medium=doi&utm_campaign=doi_welcome -
https://unikrn.com//s/doi?h=maafad1d6d_cb9789f50190531e43c7409eeead93ff1a7e21ff&l=///localdomain.pw/%2e%2e%2f&utm_medium=doi&utm_campaign=doi_welcome
Impact
-
An Attacker can redirect user to a malicious website and execute some dangerous script to steal credentiels .
-
Simplifies pishing Attacks .
Context
Unikrn runs a rewards and account system, and the report centres on the account verification flow of unikoingold.com. When a new user registers, the platform sends a verification link to the supplied email address. Clicking that link confirms the account. The link itself points at unikrn.com, specifically a path under /s/doi, and carries several query parameters, among them h, l, utm_medium and utm_campaign. The l parameter is the one the researcher manipulated to control the redirect.
That is the feature in its normal form: a link in an email that takes the freshly registered user back to the site and then onward to a destination. Because the destination is expressed as a parameter, the flow is a natural candidate for an open redirect.
Setup
To reach the flow the researcher needed a real account, so the first requirement was registration on unikoingold.com, filling in all the required fields (first name, birth date and the rest) up to the final verification step. The verification email then arrives, and its link is the request of interest.
On the tooling side the researcher used Burp Suite as an intercepting proxy in front of the browser, so that the request triggered by the verification link could be inspected and modified. The captured request shows the client as Chrome 75 on 64-bit Windows 7, and it carries a Cookie header with a Cloudflare __cfduid value and a CW session value. Both are session material and are redacted here.
One precondition matters for reproduction: the proof-of-concept URL only works for a logged-in user, as the report states explicitly.
Finding it
After registering, the researcher opened the verification email and clicked the confirmation link, with Burp Suite proxying the traffic. The request that came through contained this URL:
https://unikrn.com//s/doi?h=[redacted]&l=//[redacted]/../&utm_medium=doi&utm_campaign=doi_welcome
Two things stand out. The path begins with a double slash (//s/doi), and the l parameter holds a value built from a whitelisted-looking host, an @, and a different domain, followed by a traversal segment. The h parameter looks like an opaque verification handle, while utm_medium=doi and utm_campaign=doi_welcome are campaign tracking values. The l parameter is the one the researcher changed to reach the redirect.
Exploitation
Step 1: Create the account
Register on unikoingold.com and complete every required field up to the verification stage. This is what causes the platform to send the verification email containing the /s/doi link.
Step 2: Proxy the browser
Configure Burp Suite as the browser's proxy so the request made when the verification link is opened can be intercepted and edited.
Step 3: Intercept the verification request
The intercepted request looks like this:
GET /s/doi?h=[redacted]&l=//[redacted]/%2e%2e%2f&utm_medium=doi&utm_campaign=doi_welcome HTTP/1.1
Host: unikrn.com
Connection: close
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Encoding: gzip, deflate
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=[redacted]; CW=[redacted]
The h parameter is present in the request alongside l. The l parameter carries the destination, here written with the traversal segment percent-encoded as %2e%2e%2f rather than as a literal ../. The Cookie header holds the Cloudflare and session cookies that tie the request to the logged-in account.
Step 4: Note the value of l
The parameter to manipulate is l. Its value is the redirect target, and the researcher's approach was to keep changing it until the response sent the browser to the supplied destination.
Step 5: Use the proof-of-concept URL directly
The report also gives a clickable proof of concept, noting that the user must be logged in:
https://unikrn.com//s/doi?h=[redacted]&l=//[redacted]/../&utm_medium=doi&utm_campaign=doi_welcome
This is the same URL as the one seen in the intercepted traffic, with the traversal written literally as ../ instead of %2e%2e%2f.
Step 6: Observe the redirect and script execution
With the crafted l value the request was redirected successfully, and the researcher reports that JavaScript code executed at the destination. The report does not show the response headers or the destination page, so the exact mechanism by which the script ran is not documented beyond that statement.
Second payload
The report lists a second proof-of-concept URL, which uses a triple slash and the encoded traversal:
https://unikrn.com//s/doi?h=[redacted]&l=///localdomain.pw/%2e%2e%2f&utm_medium=doi&utm_campaign=doi_welcome
Here the l value starts with /// and names localdomain.pw directly, with no whitelisted host and no @. The encoded %2e%2e%2f traversal segment is retained.
Demonstration video
The report includes a screen recording of the flow:
The report includes a screen recording titled 2019-06-22_11-47-15.mp4.
Root cause
The /s/doi endpoint takes the destination from the l query parameter and redirects the browser to it. The value is not constrained to the site's own origin: it accepts a scheme-relative value such as //[redacted]/../, which a browser resolves to localdomain.pw because everything before the @ is treated as user information, and it also accepts a triple-slash value naming an external host directly. The traversal segment may be there to get past whatever check the endpoint performs; the report does not describe that check.
The report states that the proof-of-concept URL requires the user to be logged in.
Impact
As the report puts it, an attacker can redirect a user to a malicious website and execute dangerous script there to steal credentials, and the flaw simplifies phishing attacks. The report does not quantify how the handle is obtained or how long it stays valid.
Fix
The measure the finding points to is to stop trusting the raw l value: parse it as a URL, resolve it, and only redirect when the resulting host is on an explicit allowlist, rejecting scheme-relative values, user-information components and traversal segments. Whether that is what was implemented is not stated.
Variants to test
- Scheme-relative values with user information:
//[redacted]/. A positive result is aLocationheader pointing atattacker.tld. - Triple-slash values:
///attacker.tld/. A positive result is the same, with the browser treating the value as a host rather than a path. - Traversal after a whitelisted host:
//whitelisted.tld/../and its encoded form%2e%2e%2f. A positive result is that the endpoint accepts the value and the browser resolves it away from the whitelisted host. - Backslash variants (
\\attacker.tld) and mixed slash and backslash forms, which some parsers normalise differently from browsers. - Encoded and double-encoded separators (
%2f%2f,%252f%252f) to see whether validation and the redirect step decode the value a different number of times. - Absolute URLs with unusual schemes or ports, to check whether the allowlist compares hosts or merely prefixes.
Hunting notes
Redirect parameters on email verification and login flows are a good place to look, because they exist to send the user onward after an action and are often built quickly. The signal here was a destination parameter (l) sitting next to an opaque handle (h) and campaign tracking values in a link that arrives by email, which means the endpoint is reachable without any special tooling once an account exists. Intercepting the verification click in a proxy is enough to see the parameter and start editing it.
The researcher reported the redirect working and JavaScript code executing at the destination, and described credential theft and phishing as the impact. The report records a bounty of 50.00 USD and a CVSS of 0.0 with no severity assigned, and it was disclosed on 2020-05-06.
What happened, in plain words
Unikrn runs a rewards and account system. When you sign up on unikoingold.com, the site sends you an email with a link. You click that link and your account gets confirmed. The link goes to an address on unikrn.com under /s/doi that carries several query parameters, including l.
That last part is the problem. The address contains a parameter called l that holds the destination. The researcher changed the l value until the browser was redirected to the supplied destination. The report states that an attacker can redirect a user to a malicious website. This kind of flaw is called an open redirect: a redirect is a server instruction that says "your browser should now go to this other address", and it is "open" when the destination is not restricted to the site's own pages.
A redirect on its own sounds harmless, but it is useful to an attacker for two reasons. First, the link starts with the real Unikrn domain, so it looks trustworthy in an email. Second, the report says dangerous script can be executed at the destination to steal credentials. The researcher who found this reported that JavaScript code executed at the destination, which is what turns a plain redirect into a credential-theft story.
The feature being abused
When you register, the platform sends a verification link to the email address you supplied. Clicking it confirms the account. The link points at unikrn.com, at a path under /s/doi, and carries several query parameters. A query parameter is the part of a URL after the ?, made of name and value pairs joined by &, for example ?colour=blue&size=large. The parameters here are h, l, utm_medium and utm_campaign.
his one of the parameters in the link; the report does not explain it.lis the parameter the researcher manipulated to control the redirect.utm_mediumandutm_campaignare campaign tracking values, the kind marketing teams use to see which email brought a user in.
Because the destination is expressed as a parameter, the flow is a natural candidate for an open redirect. Any time a site lets a URL say "send me here next", the question to ask is: does the site check where "here" actually is?
Setting up
To reach the flow the researcher needed a real account, so the first requirement was registration on unikoingold.com, filling in all the required fields (first name, birth date and the rest) up to the final verification step. The verification email then arrives, and its link is the request of interest.
On the tooling side the researcher used Burp Suite as an intercepting proxy in front of the browser. A proxy is a middleman: instead of your browser talking directly to the website, it talks to the proxy, and the proxy forwards the conversation. An intercepting proxy lets you pause each request, read it, and change it before it is sent. Think of it as a postal worker who opens every letter you post, lets you read and rewrite it, and then seals it and delivers it. This is how the researcher could see the exact request behind the verification link and start editing the l value.
The captured request shows the client as Chrome 75 on 64-bit Windows 7, and it carries a Cookie header with a Cloudflare __cfduid value and a CW session value. A cookie is a small piece of data the site stores in your browser and that your browser sends back on every request, so the site can recognise you between page loads. A session cookie is the one that proves you are logged in. Both values here are session material and are redacted.
One precondition matters for reproduction: the proof-of-concept URL only works for a logged-in user, as the report states explicitly.
Finding it
After registering, the researcher opened the verification email and clicked the confirmation link, with Burp Suite proxying the traffic. The request that came through contained this URL:
https://unikrn.com//s/doi?h=[redacted]&l=//[redacted]/../&utm_medium=doi&utm_campaign=doi_welcome
Two things stand out. The path begins with a double slash (//s/doi), and the l parameter holds a value built from a whitelisted-looking host, an @, and a different domain, followed by a traversal segment.
Why does that value matter? In a URL, the part before the @ is treated as user information, a leftover from the days when URLs could carry a username and password. Browsers ignore it for the purpose of deciding which server to contact. So //[redacted]/ means "connect to localdomain.pw", and the www.whitelisteddomain.tld@ part is decoration. A check that only looks for a trusted name somewhere in the string will be fooled. The ../ is a path traversal segment: in a file path, .. means "go up one folder", and here it appears to be there to get past whatever check the endpoint performs.
The h parameter looks like an opaque verification handle, while utm_medium=doi and utm_campaign=doi_welcome are campaign tracking values. The l parameter is the redirect target, and it looked wrong because it accepted a value that resolves to a host the site does not control.
Exploitation
Step 1: Create the account
Register on unikoingold.com and complete every required field up to the verification stage. This is what causes the platform to send the verification email containing the /s/doi link. The report states that the proof-of-concept URL requires the user to be logged in.
Step 2: Proxy the browser
Configure Burp Suite as the browser's proxy so the request made when the verification link is opened can be intercepted and edited. This step is what turns a normal click into an experiment: you can see the request, change one value, and send it again.
Step 3: Intercept the verification request
The intercepted request looks like this:
GET /s/doi?h=[redacted]&l=//[redacted]/%2e%2e%2f&utm_medium=doi&utm_campaign=doi_welcome HTTP/1.1
Host: unikrn.com
Connection: close
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Encoding: gzip, deflate
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: __cfduid=[redacted]; CW=[redacted]
Line by line:
GET /s/doi?... HTTP/1.1is the request line.GETis the method used to ask for a page./s/doiis the path on the server. Everything after?is the query string.HTTP/1.1is the version of the protocol being spoken.Host: unikrn.comtells the server which site the request is for. One server can host many sites, so this header picks one.Connection: closeasks the server to close the connection after the response instead of keeping it open for reuse.Upgrade-Insecure-Requests: 1is the browser saying it would prefer an encrypted (HTTPS) version of the page if one exists.User-Agent: ...identifies the browser and operating system. Here it is Chrome 75 on 64-bit Windows 7.Accept: ...lists the content types the browser is willing to receive, such as HTML, images and XML.Accept-Encoding: gzip, deflatesays the browser can accept compressed responses, which saves bandwidth.Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7lists the user's preferred languages, with weights (q=) indicating preference order.Cookie: __cfduid=[redacted]; CW=[redacted]carries the cookies.__cfduidis a Cloudflare cookie, andCWis the session cookie that ties the request to the logged-in account.
The h parameter is present in the request alongside l. The l parameter carries the destination, here written with the traversal segment percent-encoded as %2e%2e%2f rather than as a literal ../. Percent-encoding is a way of writing characters that would otherwise be awkward in a URL: %2e is a dot, %2f is a slash. So %2e%2e%2f is the same three characters as ../, just written in a form that some checks may not recognise.
Step 4: Note the value of l
The parameter to manipulate is l. Its value is the redirect target, and the researcher's approach was to keep changing it until the response sent the browser to the supplied destination. This is the core of the test: change one input, observe where the browser ends up, repeat.
Step 5: Use the proof-of-concept URL directly
The report also gives a clickable proof of concept, noting that the user must be logged in:
https://unikrn.com//s/doi?h=[redacted]&l=//[redacted]/../&utm_medium=doi&utm_campaign=doi_welcome
This is the same URL as the one seen in the intercepted traffic, with the traversal written literally as ../ instead of %2e%2e%2f. Having both forms matters: if one is blocked and the other is not, that tells you the check is looking at the raw text rather than at what the text means.
Step 6: Observe the redirect and script execution
With the crafted l value the request was redirected successfully, and the researcher reports that JavaScript code executed at the destination. JavaScript is the programming language browsers run to make pages interactive; code running on the attacker's page can read what the user types there. The report does not show the response headers or the destination page, so the exact mechanism by which the script ran is not documented beyond that statement.
Second payload
The report lists a second proof-of-concept URL, which uses a triple slash and the encoded traversal:
https://unikrn.com//s/doi?h=[redacted]&l=///localdomain.pw/%2e%2e%2f&utm_medium=doi&utm_campaign=doi_welcome
Here the l value starts with /// and names localdomain.pw directly, with no whitelisted host and no @. The encoded %2e%2e%2f traversal segment is retained. This variant tests a different trick: some parsers treat a value beginning with // as a host, and the extra slash may slip past a check that expects a single leading slash.
Demonstration video
The report includes a screen recording of the flow:
The report includes a screen recording titled 2019-06-22_11-47-15.mp4.
Root cause
The /s/doi endpoint takes the destination from the l query parameter and redirects the browser to it. The value is not constrained to the site's own origin. Origin here means the combination of scheme, host and port that identifies a site, for example https://unikrn.com. The endpoint accepts a scheme-relative value such as //[redacted]/../, which a browser resolves to localdomain.pw because everything before the @ is treated as user information, and it also accepts a triple-slash value naming an external host directly.
Impact
As the report puts it, an attacker can redirect a user to a malicious website and execute dangerous script there to steal credentials, and the flaw simplifies phishing attacks. Phishing is the practice of sending a message that looks genuine so the recipient hands over a password or other secret. The report does not quantify how the handle is obtained or how long it stays valid.
Fix
The measure the finding points to is to stop trusting the raw l value: parse it as a URL, resolve it, and only redirect when the resulting host is on an explicit allowlist, rejecting scheme-relative values, user-information components and traversal segments. An allowlist is a list of things that are permitted, with everything else refused. Whether that is what was implemented is not stated.
Variants to test
- Scheme-relative values with user information:
//[redacted]/. A positive result is aLocationheader pointing atattacker.tld. TheLocationheader is the server's instruction telling the browser where to go next. - Triple-slash values:
///attacker.tld/. A positive result is the same, with the browser treating the value as a host rather than a path. - Traversal after a whitelisted host:
//whitelisted.tld/../and its encoded form%2e%2e%2f. A positive result is that the endpoint accepts the value and the browser resolves it away from the whitelisted host. - Backslash variants (
\\attacker.tld) and mixed slash and backslash forms, which some parsers normalise differently from browsers. Normalise means to rewrite a value into a standard form before comparing or using it. - Encoded and double-encoded separators (
%2f%2f,%252f%252f) to see whether validation and the redirect step decode the value a different number of times. Decoding is turning%2fback into/. - Absolute URLs with unusual schemes or ports, to check whether the allowlist compares hosts or merely prefixes.
Hunting notes
Redirect parameters on email verification and login flows are a good place to look, because they exist to send the user onward after an action and are often built quickly. The signal here was a destination parameter (l) sitting next to an opaque handle (h) and campaign tracking values in a link that arrives by email, which means the endpoint is reachable without any special tooling once an account exists. Intercepting the verification click in a proxy is enough to see the parameter and start editing it.
The researcher reported the redirect working and JavaScript code executing at the destination, and described credential theft and phishing as the impact. The report records a bounty of 50.00 USD and a CVSS of 0.0 with no severity assigned, and it was disclosed on 2020-05-06. CVSS is a scoring system for the severity of a vulnerability, where 0.0 is the lowest possible score.
Glossary
- Open redirect: a redirect whose destination is not restricted, so an attacker can send users to any site they choose.
- Redirect: a server instruction telling the browser to load a different address instead.
- Query parameter: a name and value pair after the
?in a URL, separated by&. - URL: the address of a resource on the web, made of scheme, host, path and optional query.
- Scheme: the first part of a URL, such as
https, that says how to fetch the resource. - Host: the server name in a URL, such as
unikrn.com. - Origin: the combination of scheme, host and port that identifies a site for security purposes.
- Path: the part of a URL after the host that names a resource on the server.
- Scheme-relative URL: a URL beginning with
//that borrows the current page's scheme and names a host. - User information: the optional
user@part before a host in a URL, ignored by browsers when choosing the server. - Path traversal: using
..segments to move up out of an intended folder or path. - Percent-encoding: writing characters as
%followed by two hex digits, such as%2efor a dot. - Decoding: converting percent-encoded text back into the characters it represents.
- Normalise: rewriting a value into a standard form before comparing or using it.
- Cookie: a small piece of data stored by the browser and sent back to the site on each request.
- Session cookie: the cookie that proves a user is logged in.
- Proxy: a middleman server that forwards traffic between a client and a destination.
- Intercepting proxy: a proxy that lets you pause, read and edit requests before forwarding them.
- Burp Suite: a tool used to intercept and modify web traffic.
- Request: a message from the browser asking a server for something.
- Response: the server's reply to a request.
- Header: a name and value line in a request or response carrying metadata.
- Request line: the first line of a request, holding method, path and protocol version.
- Method: the verb in a request, such as
GETfor fetching a page. - User-Agent: a header identifying the browser and operating system.
- Location header: the response header that tells the browser where to redirect.
- JavaScript: the programming language browsers run to make pages interactive.
- Phishing: tricking someone into handing over secrets by pretending to be a trusted party.
- Credentials: the username and password (or similar) used to prove identity.
- Allowlist: a list of permitted values, with everything else refused.
- CVSS: a scoring system for vulnerability severity, from 0.0 to 10.0.
- Bounty: a payment made by a program to a researcher who reports a valid vulnerability.
- Disclosure: the public release of a vulnerability report.