Skip to content
Open redirect Disclosed report Beginner

target="_blank" Vulnerability Resulting in Critical Phishing Vector

A link in user-generated map descriptions opened with target="_blank" without noopener, letting the opened page control the original Mapbox tab through window.opener. An attacker could replace the legitimate Mapbox session with a phishing login form.

cha5m Follow

Originally disclosed on HackerOne

  • Disclosed after 6 days

Summary by the program

On September 1st, 2016, @n0rb3r7 reported a vulnerability in the Mapbox Classic editor related to a known window.opener.location.href issue with user generated content and cross origin navigation when target="_blank" (see HTML bug report). This was addressed via the creation of the noopener link attribute (see whatwg PR) and browser compatibility efforts are ongoing. As of now it is has limited support, though there are open tickets for adding it to the majority of remaining browsers.

After an internal review of the issue- taking into consideration previous reports similar in nature, browser compatibility progress towards making noopener the default, the level of effort necessary to attempt this exploit, the bandwith required for patching it, as well as the fact that Mapbox Classic editor is a legacy product- we decided that we would not move forward with an immediate fix at this time.

This report was well put together and looking into it helped us further our research on this vulnerability type, thank you again @n0rb3r7!

The report

Description I have a script running on my server which gives me full control over a visitor's window object. This allows me to replace the user's legitimate mapbox.com session with my own Mapbox phishing form (not live). As you can see from the proof-of-concept video below, this vulnerability works cross-origin. This is an extremely effective phishing vector and should be remediated ASAP.

Video PoC:

PoC_Mapbox.mov From the original on HackerOne

Reproduction Steps:

  1. Navigate to my map at https://www.mapbox.com/editor/?id=chasemiller5.19coghk8#data
  2. Click on my website link in the description (http://chasemiller.me/hax/mapbox_test.html)
  3. This should open the link and change the user's legitimate mapbox.com session to my malicious Mapbox login phishing page (not active) (behavior may vary slightly between browsers).

Mitigation: This bug can be easily mitigated by using the 'noopener' link type. This sets the 'window.opener' property to 'null'

The original report as published on HackerOne, by cha5m. 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 links with target="_blank" without rel="noopener", so the opened page retained a window.opener reference to the Mapbox tab.

Impact

An attacker could redirect a victim's Mapbox tab to a convincing phishing page; the program noted the exploit requires effort and chose not to fix it immediately.

What the attacker needed

Victim clicks a crafted link; attacker can place a link in user content

The fix

Links that open in a new tab should include rel="noopener" so the new page cannot access window.opener.

How it was found

  1. Open the attacker's map in the Mapbox editor.
  2. Click the website link in the map description.
  3. The opened page changes the original Mapbox tab to a phishing login page.

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 reach back into the tab that opened it using a browser feature called window.opener. If the site does not block that, the new page can change what the original tab shows. Here the attacker's page could swap the real Mapbox page for a fake login form to steal credentials.

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 cha5m

View all

4 more disclosed reports, best first.

More from Mapbox

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.