-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
External links with target="_blank" missing rel="noopener noreferrer" #12329
Copy link
Copy link
Open
Labels
Lead: @jimchampIssues overseen by Jim (Front-end Lead, BookNotes) [managed]Issues overseen by Jim (Front-end Lead, BookNotes) [managed]Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]This big issue needs a checklist or subissues to describe a breakdown of work. [managed]Needs: ResponseIssues which require feedback from leadIssues which require feedback from leadNeeds: ReviewThis issue/PR needs to be reviewed in order to be closed or merged (see comments). [managed]This issue/PR needs to be reviewed in order to be closed or merged (see comments). [managed]Needs: TriageThis issue needs triage. The team needs to decide who should own it, what to do, by when. [managed]This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed]Theme: SecurityType: BugSomething isn't working. [managed]Something isn't working. [managed]
Metadata
Metadata
Assignees
Labels
Lead: @jimchampIssues overseen by Jim (Front-end Lead, BookNotes) [managed]Issues overseen by Jim (Front-end Lead, BookNotes) [managed]Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]This big issue needs a checklist or subissues to describe a breakdown of work. [managed]Needs: ResponseIssues which require feedback from leadIssues which require feedback from leadNeeds: ReviewThis issue/PR needs to be reviewed in order to be closed or merged (see comments). [managed]This issue/PR needs to be reviewed in order to be closed or merged (see comments). [managed]Needs: TriageThis issue needs triage. The team needs to decide who should own it, what to do, by when. [managed]This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed]Theme: SecurityType: BugSomething isn't working. [managed]Something isn't working. [managed]
Problem
Several templates across Open Library use anchor tags with target="_blank" but do not include the recommended rel="noopener noreferrer" attribute.
This creates a reverse tabnabbing vulnerability, where the newly opened page can access window.opener and redirect the original tab to a malicious site.
Reproducing the bug
The anchor tag should include security attributes:
The anchor tag is missing the rel attribute:
Context
Automated Detection
A test was added to scan templates for unsafe usage:
Result
Affected Files (examples)
Impact
screenshot