Skip to content
Open redirect Disclosed report Beginner

returnUrl= allow attacker to redirect users to the another phising website and takeover credientials

The login flow accepted a user-supplied returnUrl parameter and redirected the browser to it after authentication, without checking that the destination belonged to the application. An attacker could send a crafted login link that lands the victim on a phishing site, where entered credentials could be captured.

basant0x01 Follow

Originally disclosed on HackerOne

  • Triaged in 8 months
  • Fixed in 15 months
  • Paid in 9 months
  • Disclosed after 3.1 years

Hello team, While testing the application https://crm.na1.insightly.com, i found an interesting parameter from where i was able to redirect users to the another domains and can takeover the victims account. I found this issue in the login authentication so there will be the chance that i can easily takeover victims account.

Vulnerable URL: ██████&returnUrl=http%3a%2f%2f192.168.1.77%3a8000%2f

This url will work once a time, every time for the new attack or redirect, we have to generate new url.

#STEPS TO REPLICATE [1]. Go to the website [ crm.na1.insightly.com ] and login with your credentials [2]. Now intercept the request you will get the request

HTML
POST /User/AuthenticateForms HTTP/1.1
Host: login.insightly.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/█████ Firefox/99.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 200
Origin: https://login.insightly.com
Connection: close
Referer: https://login.insightly.com/User/Login?ReturnUrl=%2f
Cookie: █████
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1

__RequestVerificationToken=4BVQV2MAdvcy2OyK6O0n3y42YRSJDDLcxesTFOeBBnwMLe1tiW_wCpMUoVZOop4wu1SxC95l_rcYoEGGWnzriUmmZJE1&email=ilovebugbounty%40gmail.com&password=AMRIT007qwerty%23&ReturnUrl=%2F&AppId=

[3]. Now change the parameter ReturnUrl=%2F > ReturnUrl=https://evil.com

[4]. Send the request [5]. Now you will receive GET url as

HTML
GET /User/FrontDoorLogin/?token=YrkOz7vdHHA9AH7B%2fY5jUdIP1%2bchPdePfn0Zm7uCtVQui0tHHMW24B14WwsYP5%2bKpa3Xz7%2f5r5muQa3EB%2bQEwtPlJ8XbvozoLZFfhD75Sm3tKLhdgfWWHYq8abV2%2bpOtifD1I5N2uomDBXvMQ8tjFREb39XDuUcrObQMUsqboMZY9dojVqORmIYwb4VPyoSBaYOF4%2bYOX3GTYj8t1ArOA0xeH4oorz6flU6FLrfTLdtG6u%2fC7vZ9CfvsfH3F%2bBye&returnUrl=https://evil.com HTTP/1.1
Host: crm.na1.insightly.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/█████████ Firefox/99.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://login.insightly.com/
Connection: close
Cookie: ███████
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-site
Sec-Fetch-User: ?1

████████

[6]. Now copy that url and domain. For the attack the final url will be like

███/WKUbuJKtOIbCH0Npi1DvVp0kXUo7JYrQ2Kep6VUOybmgBo6q9byEMy3Itsa35Ra60cK2eUFK6i78lKdX4/QN4Ln3UPEzfpMTvk8ocH6Ikix0zKolaN/0kaMWB3Ia4GCVOvTPhfZUGkgOY/HMC9ZCrdjXMNP/joOqZ/oqBrFRu4tCE/mX/JW5o3J18Hx9MOuOVCNgs1mD8zKjIz1uSW+oBmu+MfXT&returnUrl=https://evil.com

███████

Impact

Attacker can easily redirect urls to the another phishing site and can takeover the victims account using the login endpoint.

The original report as published on HackerOne, by basant0x01. 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 application used the returnUrl value for a post-login redirect without validating that it pointed to an allowed internal destination.

Impact

An attacker could redirect users to a phishing site after login and potentially capture their credentials, though the report does not demonstrate an actual account takeover.

What the attacker needed

Victim clicks a crafted link; valid login credentials

How it was found

  1. Log in to the CRM application with valid credentials.
  2. Intercept the authentication request sent to the login host.
  3. Change the ReturnUrl value from the internal path to an external attacker-controlled address.
  4. Send the modified request and observe the redirect response containing the external returnUrl.
  5. Copy the resulting redirect URL and use it as the link sent to a victim.

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.

After you log in, a website often sends you back to the page you came from, using a value in the address called a return URL. If the site trusts whatever address is placed there, an attacker can make that address point to their own fake login page. The victim sees the real site first, then gets bounced to the attacker's copy and may type their password there.

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 by basant0x01

View all

12 more disclosed reports, best first.

More from Insightly

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.