Skip to content
Open redirect Disclosed report Beginner

Reverse Tab-nabbing at www.instacart.com/store/partner_recipe?recipe_url=

The partner_recipe endpoint allowed an attacker to inject a link that opened in a new tab with target="_blank" and no rel="noopener", so the new page could access window.opener and redirect the original tab to a phishing page. An attacker could use this to trick users into entering credentials on a fake login page.

ak1t4 Follow

Originally disclosed on HackerOne

  • Fixed in 4 days
  • Paid in 18 days
  • Disclosed after 19 days

Summary by the researcher

A reverse tab-nabbing link attack can be launched cause an evil link injection at www.instacart.com/store/partner_recipe?recipe_url=

Thanks to Karel Origin (https://twitter.com/Karel_Origin) for his report at https://hackerone.com/reports/196221, You made me think that more could be done, I owe you a beer :)

The report

Summary

Instacart at /store/partner_recipe?recipe_url= endpoint is vulnerable to reverse tabnabbing, since the injected link use target="_blank" , this means the page that opens in a new tab can access the initial tab and change its location using the window.opener property.

example: <a href="https://s3-eu-west-1.amazonaws.com/some-evil-host/evil2.html" target="_blank" class="">

Reproduction Steps & PoC

POC A

  1. Go to https://www.instacart.com/store/partner_recipe?recipe_url=https://s3-eu-west-1.amazonaws.com/some-evil-host/evil2.html&partner_name=&ingredients[]=apples&ingredients[]=butter&ingredients[]=Splenda+Brown+Sugar+Blend&ingredients[]=cinnamon&ingredients[]=nutmeg&title=Example-Reciper-with-Evil-Link&description=&image_url=x
  2. Click on "Example-Reciper-with-Evil-Link"
  3. You see that new page show 404 error and the principal page is change by a fake login page of instacart

Evil link

Captura_de_pantalla_2017-05-12_a_las_2.04.28.png
Captura_de_pantalla_2017-05-12_a_las_2.04.28.png From the original on HackerOne

New open Page

Captura_de_pantalla_2017-05-12_a_las_2.04.34.png
Captura_de_pantalla_2017-05-12_a_las_2.04.34.png From the original on HackerOne

Principal page changed for a phishing page

Captura_de_pantalla_2017-05-12_a_las_2.04.50.png
Captura_de_pantalla_2017-05-12_a_las_2.04.50.png From the original on HackerOne

POC B

1)Go to https://www.instacart.com/store/partner_recipe?recipe_url=https://s3-eu-west-1.amazonaws.com/some-evil-host/evil.html&partner_name=&ingredients[]=apples&ingredients[]=butter&ingredients[]=Splenda+Brown+Sugar+Blend&ingredients[]=cinnamon&ingredients[]=nutmeg&title=%22Barb%27s+Fried+Apples+-Diabetic-Low+Fat&description=&image_url=x 2) Click on "Example-Reciper-with-Evil-Link" 3) You see alert popup in instacart principal page

Captura_de_pantalla_2017-05-12_a_las_2.07.16.png
Captura_de_pantalla_2017-05-12_a_las_2.07.16.png From the original on HackerOne

(Tested on all latest version browser: safari / chrome / firefox)

FIX & MITIGATION

To mitigate this issue we need to use rel="nofollow noopener noreferrer" as follows:

</a>```

Now when you click on this link, the attacker cannot access the initial tab.

#### References

**https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/**

Let me know if more info needed or anything else,

kind regards,
@ak1t4

The original report as published on HackerOne, by ak1t4. 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 rendered user-supplied recipe_url as a link with target="_blank" but without rel="noopener", allowing the opened page to access window.opener.

Impact

An attacker could redirect the original tab to a phishing page, potentially stealing credentials; the report tested this on Safari, Chrome, and Firefox.

What the attacker needed

Victim clicks a crafted link; victim clicks the recipe link

The fix

Add rel="nofollow noopener noreferrer" to links that open in a new tab.

How it was found

  1. Visit the crafted partner_recipe URL containing the malicious recipe_url.
  2. Click the recipe link titled 'Example-Reciper-with-Evil-Link'.
  3. Observe the new tab open and the original tab being replaced by a fake Instacart login page or showing an alert.

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.

When a link opens a new tab, the new page can sometimes control the original page if the link lacks a security attribute. Here, the site let an attacker put their own link on a recipe page, and clicking it opened a malicious page that could replace the original tab with a fake login form. This is called reverse tab-nabbing.

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 ak1t4

View all

17 more disclosed reports, best first.

More from Instacart

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.