Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

add rel="noopener" to all external links with target="_blank" #9743

Closed
diracdeltas opened this issue Jun 27, 2017 · 1 comment
Closed

add rel="noopener" to all external links with target="_blank" #9743

diracdeltas opened this issue Jun 27, 2017 · 1 comment

Comments

@diracdeltas
Copy link
Member

diracdeltas commented Jun 27, 2017

Test plan

#10290 (comment)


(reported by email by the folks at lgtm.com)

In general, cross-origin anchor elements with target="_blank" create a security risk as described in https://mathiasbynens.github.io/rel-noopener/. This is solved by adding
rel="noopener" to all links with target="_blank", which nulls the window.opener object.

I don't think this is currently exploitable in Brave because, based on experimentation, window.opener is automatically set to null when the opener is a chrome-extension:// URL. However this for defense in depth we should probably add rel="noopener" anyway.

@cezaraugusto
Copy link
Contributor

cc @kjozwiak

@bsclifton bsclifton added this to the 0.21.x (Nightly Channel) milestone Aug 7, 2017
dfperry5 pushed a commit to dfperry5/browser-laptop that referenced this issue Aug 18, 2017
To avoid tab-nabbing attacks, all external links with
target='_blank' must have rel='noopener'

Fix brave#9743
@bbondy bbondy modified the milestones: 0.21.x (Developer Channel), 0.20.x (Beta Channel) Oct 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.