Skip to content
Open redirect Disclosed report Beginner

Tab nabbing in Hackerone inbox.

Links in the HackerOne inbox opened in a new tab without isolating the opener, so the opened page could change the original inbox tab's location. An attacker could redirect a victim's inbox tab to a phishing page in the background and steal credentials.

adhamsadaqah Follow

Originally disclosed on HackerOne

Bounty$500 Low View original
  • Triaged in 4 months
  • Fixed in 4 months
  • Paid in 4 months
  • Disclosed after 4 months

Description: Tab nabbing vulnerability occurs When you open a link in a new tab ( target="_blank" ), the page that opens in a new tab can access the initial tab and change its location using the window.opener property and from this a lot of phishing attacks could happen. This scenario occurs on hackerone.com/bugs. Attack Scenario: The attacker will create any website with any content which include this script tag

HTML
<script>
if (window.opener) window.opener.parent.location.replace('http://phishing.com');
if (window.parent != window) window.parent.location.replace('http://phishing.com');
</script>

Steps To Reproduce:

  1. submit a report to any program and write in the description your phishing website.
  2. Open your inbox and click on your phishing website will open in a new tab.
  3. Open the console and write window.opener.location='http://google.com'
  4. Return to HackerOne inbox and you will find it redirected to Google.

Impact

  • Due to the redirection is done in the background and most people aren't aware of this type of attack unlike the open redirection, Most people will fall into it and will enter their credentials leading to account takeover.

The original report as published on HackerOne, by adhamsadaqah. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

The target is HackerOne itself, specifically the report inbox at hackerone.com/bugs. The inbox is where a researcher reads reports submitted to programs, and it is a page that renders attacker-controlled content: the description of a submitted report. That combination, a privileged page displaying text written by someone else, is what makes the inbox interesting for a tab nabbing attack.

Tab nabbing is a reverse-tabnabbing variant. When a link opens with target="_blank", the new page receives a reference to the tab that opened it through window.opener. Unless the link is opened with rel="noopener" (or noreferrer), the new page can read and write properties on that opener, including its location. The user sees a new tab open, looks at it, and later returns to the original tab, which is now showing a different site. If the original tab was a sensitive application, the swapped page can be a convincing login form.

Setup

No special tooling is required. The researcher needs a HackerOne account able to submit a report to any program, and access to their own inbox to view that report. The attack relies on the inbox rendering a link in the report description that opens in a new tab, and on that new tab retaining a window.opener reference to the inbox. A browser console is used to demonstrate the redirection manually.

Finding it

The researcher observed that a link in a report description, clicked in the inbox, opens in a new tab that can reach the initial tab through window.opener. Because the new page can reach the initial tab through window.opener, the page that opens can change the location of the inbox tab. The inbox is a high-value page: it is authenticated, it is where researchers spend time, and a swapped page there is likely to be trusted. That is the condition the researcher identified as wrong.

Exploitation

Step 1: Submit a report containing the phishing link

Submit a report to any program and put the phishing website address in the description. The description is the attacker-controlled field that the inbox later renders as a clickable link.

Step 2: Open the inbox and click the link

Open your inbox and click the phishing website link. It opens in a new tab, and because of the target="_blank" behaviour, that new tab keeps a reference to the inbox tab as its opener.

Step 3: Redirect the opener from the console

In the new tab, open the console and run:

JavaScript
window.opener.location='http://google.com'

This writes to the location property of the tab that opened the current page, which is the HackerOne inbox tab. The inbox tab navigates away in the background while the user is still looking at the new tab.

Step 4: Return to the inbox

Return to the HackerOne inbox tab and it is now showing Google instead of the inbox. The navigation happened silently, so the user has no reason to suspect the tab changed.

The researcher also describes the fully automated version, where the attacker's page carries a script that performs the swap as soon as it loads, without any console interaction:

HTML
<script>
if (window.opener) window.opener.parent.location.replace('http://phishing.com');
if (window.parent != window) window.parent.location.replace('http://phishing.com');
</script>

The first line checks that an opener exists and, if so, replaces the opener's parent location with the attacker's phishing page. The second line handles the case where the page is loaded inside a frame: if the current window is not the top window, it replaces the parent's location. Together they cover both the new-tab case and the framed case, so the victim's original tab is sent to http://phishing.com in the background.

Root cause

The inbox opens links from report descriptions in a new tab that keeps a live window.opener handle to the inbox. The new document keeps a live window.opener handle to the authenticated inbox, though the exact markup is not shown in the report. Any page reachable through such a link can therefore navigate the inbox tab. The report does not show the exact markup the inbox produced, so the precise attribute combination is inferred from the observed behaviour rather than quoted.

Impact

The redirection happens in the background, and most users are not aware of this class of attack, unlike a visible open redirection. The researcher argues that most people will fall for it and enter their credentials on the swapped page, leading to account takeover. The impact therefore depends on the victim returning to the tab and trusting what they see: the attacker does not read anything from the inbox directly, they only control where it points. The report was rated low severity and paid a 500 USD bounty.

Fix

The report does not describe the fix that was applied. The standard remedy for this class is to add rel="noopener" to links opened with target="_blank", or to set Cross-Origin-Opener-Policy on the inbox so that cross-origin openers are severed. Either measure removes the window.opener handle the attacker's page relies on.

Variants to test

  1. Any page that renders user-supplied links and opens them in a new tab: report descriptions, comments, profile bios, support tickets, chat messages. A positive result is that a page you control, opened from that link, can read window.opener and navigate the original tab.
  2. Links inside framed content. The second line of the payload targets the case where the attacker page is loaded in a frame; test pages that embed third-party content and check whether the parent can be navigated.
  3. window.open calls made by the application itself, for example preview or external-link buttons. A positive result is a returned window handle whose opener is the sensitive page.
  4. Markdown or rich-text renderers that allow raw HTML. If an attacker can inject an anchor with target="_blank" and no rel, the same swap is possible without relying on the application's own link rendering.

Hunting notes

This bug tends to hide wherever an authenticated application displays links written by other users and opens them in a new tab: inboxes, ticketing systems, comment threads, and any markdown-rendered field. During recon, the signal is a link in a privileged page that opens a new tab; checking window.opener in the console of the new tab is enough to confirm it. The researcher demonstrated impact by showing the inbox tab itself being navigated to Google from the console.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

What happened, in plain words

HackerOne is a platform where security researchers report bugs to companies. Each report has a description, and the person who submitted it controls that text. When you read a report in your inbox, HackerOne shows the description, and any link in it can be clicked. That link opens in a new browser tab.

The problem is that the new tab keeps a connection back to the tab that opened it. In a browser, that connection is called window.opener. If a page has that connection, it can tell the original tab to go to a different web address. So an attacker can put a link in a report description, and when a researcher clicks it, the new tab can quietly send the researcher's HackerOne inbox tab to another page. The researcher might not notice, come back to the tab later, see a login form, and type their password into the attacker's page. That is called tab nabbing.

The report was rated low severity and paid a 500 USD bounty.

Context

The target is HackerOne itself, specifically the report inbox at hackerone.com/bugs. The inbox is where a researcher reads reports submitted to programs. It is a page that displays content written by someone else: the description of a submitted report. That combination, a logged-in page showing text from another user, is what makes the inbox interesting for this attack.

Tab nabbing is a variant of reverse tabnabbing. When a link opens with target="_blank", the new page gets a reference to the tab that opened it through window.opener. Unless the link is opened with rel="noopener" (or noreferrer), the new page can read and change properties on that opener, including its location. The user sees a new tab open, looks at it, and later returns to the original tab, which is now showing a different site. If the original tab was a sensitive application, the swapped page can be a convincing login form.

Think of it like this: you open a door for a stranger (the new tab), and you leave the door to your own room (the original tab) unlocked. The stranger can walk into your room and rearrange things while you are not looking.

Setup

No special tools are needed. The researcher needs a HackerOne account that can submit a report to any program, and access to their own inbox to view that report. The attack relies on the inbox showing a link in the report description that opens in a new tab, and on that new tab keeping a window.opener reference to the inbox. A browser console is used to demonstrate the redirection manually.

A browser console is a built-in tool in most browsers where you can type JavaScript commands and see the results. You can open it with F12 or Ctrl+Shift+I (or Cmd+Option+I on a Mac) and then click the Console tab.

Finding it

The researcher noticed that when a link in a report description is clicked in the inbox, the destination opens in a new tab that can reach the initial tab through window.opener. Because the new page can reach the initial tab through window.opener, the page that opens can change the location of the inbox tab. The inbox is a high-value page: it is authenticated (you are logged in), it is where researchers spend time, and a swapped page there is likely to be trusted. That is the condition the researcher identified as wrong.

Exploitation

Step 1: Submit a report containing the phishing link

Submit a report to any program and put the phishing website address in the description. The description is the field the attacker controls, and the inbox later shows it as a clickable link.

Why this step: the attacker needs a way to get a link into a page that the victim will view while logged in. The report description is that way.

Step 2: Open the inbox and click the link

Open your inbox and click the phishing website link. It opens in a new tab, and because of the target="_blank" behaviour, that new tab keeps a reference to the inbox tab as its opener.

Why this step: this is what a victim would do. The attacker wants to confirm that the link opens in a new tab and that the new tab can still talk to the inbox tab.

Step 3: Redirect the opener from the console

In the new tab, open the console and run:

JavaScript
window.opener.location='http://google.com'

This writes to the location property of the tab that opened the current page, which is the HackerOne inbox tab. The inbox tab navigates away in the background while the user is still looking at the new tab.

Line by line:

  • window.opener is the reference to the tab that opened this one. It is like a phone line back to the original tab.
  • .location is the address bar of that tab.
  • ='http://google.com' sets that address bar to Google, so the original tab loads Google.

Why this step: this proves that the new tab can control the original tab. The researcher uses Google here just to show the change clearly; an attacker would use a fake login page instead.

Step 4: Return to the inbox

Return to the HackerOne inbox tab and it is now showing Google instead of the inbox. The navigation happened silently, so the user has no reason to suspect the tab changed.

Why this step: this confirms the attack worked. The victim would see a different page without having clicked anything in that tab.

The researcher also describes the fully automated version, where the attacker's page carries a script that performs the swap as soon as it loads, without any console interaction:

HTML
<script>
if (window.opener) window.opener.parent.location.replace('http://phishing.com');
if (window.parent != window) window.parent.location.replace('http://phishing.com');
</script>

Line by line:

  • <script> and </script> mark the start and end of a piece of JavaScript code that the browser runs.
  • if (window.opener) checks whether this page was opened by another tab. If there is no opener, the next command is skipped.
  • window.opener.parent.location.replace('http://phishing.com'); tells the opener's parent window to go to http://phishing.com. The parent part matters when the opener is itself inside a frame; otherwise it is the same as the opener.
  • if (window.parent != window) checks whether the current page is inside a frame. If it is not the top window, the next command runs.
  • window.parent.location.replace('http://phishing.com'); sends the parent frame to the phishing page.

Together they cover both the new-tab case and the framed case, so the victim's original tab is sent to http://phishing.com in the background.

Why this step: this is the real attack. The victim does not need to open the console; just loading the attacker's page is enough.

Root cause

The inbox opens links from report descriptions in a new tab that keeps a live window.opener handle to the inbox. The new page keeps a live window.opener handle to the logged-in inbox, though the exact markup is not shown in the report. Any page reachable through such a link can therefore navigate the inbox tab. The report does not show the exact HTML the inbox produced, so the precise attribute combination is inferred from the observed behaviour rather than quoted.

Impact

The redirection happens in the background, and most users are not aware of this class of attack, unlike a visible open redirection. The researcher argues that most people will fall for it and enter their credentials on the swapped page, leading to account takeover. The impact therefore depends on the victim returning to the tab and trusting what they see: the attacker does not read anything from the inbox directly, they only control where it points.

Fix

The report does not describe the fix that was applied. The standard remedy for this class is to add rel="noopener" to links opened with target="_blank", or to set Cross-Origin-Opener-Policy on the inbox so that cross-origin openers are cut. Either measure removes the window.opener handle the attacker's page relies on.

Variants to test

  1. Any page that shows user-supplied links and opens them in a new tab: report descriptions, comments, profile bios, support tickets, chat messages. A positive result is that a page you control, opened from that link, can read window.opener and navigate the original tab.
  2. Links inside framed content. The second line of the payload targets the case where the attacker page is loaded in a frame; test pages that embed third-party content and check whether the parent can be navigated.
  3. window.open calls made by the application itself, for example preview or external-link buttons. A positive result is a returned window handle whose opener is the sensitive page.
  4. Markdown or rich-text renderers that allow raw HTML. If an attacker can inject a link with target="_blank" and no rel, the same swap is possible without relying on the application's own link rendering.

Hunting notes

This bug tends to hide wherever a logged-in application shows links written by other users and opens them in a new tab: inboxes, ticketing systems, comment threads, and any markdown-rendered field. During recon, the signal is a link in a privileged page that opens a new tab; checking window.opener in the console of the new tab is enough to confirm it. The researcher demonstrated impact by showing the inbox tab itself being navigated to Google from the console.

Glossary

  • Tab nabbing: an attack where a page opened in a new tab changes the original tab to a fake page, often a login form, to steal credentials.
  • Reverse tabnabbing: another name for the same idea, focusing on the new page controlling the opener.
  • window.opener: a JavaScript reference that a page opened by another tab has to that original tab.
  • target="_blank": an HTML attribute on a link that tells the browser to open the link in a new tab or window.
  • rel="noopener": an HTML attribute on a link that stops the new page from getting a window.opener reference.
  • rel="noreferrer": an HTML attribute that also stops the new page from getting a window.opener reference and prevents sending the referring page address.
  • location: the part of a browser window that holds the current web address; setting it navigates the window.
  • Console: a tool in the browser where you can type and run JavaScript commands.
  • JavaScript: the programming language that web pages use to make things happen in the browser.
  • HTML: the language used to write web pages.
  • <script> tag: an HTML tag that contains JavaScript code for the browser to run.
  • Frame: a way to show one web page inside another; the outer page is the parent.
  • window.parent: a JavaScript reference to the window that contains the current page when it is inside a frame.
  • window.open: a JavaScript function that opens a new window or tab.
  • Markdown: a simple way to format text using symbols like * and #, often used in comments and descriptions.
  • Rich-text renderer: a part of a website that turns formatted text into HTML, sometimes allowing raw HTML.
  • Cross-Origin-Opener-Policy (COOP): a security header a website can send to stop other sites from keeping a window.opener reference to it.
  • Open redirection: a vulnerability where a website sends you to another site based on a parameter you control, usually visibly.
  • Account takeover: when an attacker gains control of someone else's account, often by stealing their password.
  • Phishing: tricking someone into entering their credentials on a fake website.
  • Severity: a rating of how serious a vulnerability is.
  • Bounty: a reward paid to a researcher for finding a valid vulnerability.
  • Authenticated: a page or action that requires you to be logged in.
  • Recon: the early phase of security testing where you look for potential targets and behaviours.

More by adhamsadaqah

View all

1 more disclosed report, best first.

More from HackerOne

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.