🔒 Fix reverse tabnabbing vulnerabilities in external links#78
🔒 Fix reverse tabnabbing vulnerabilities in external links#78
Conversation
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🎯 What:
Fixed a reverse tabnabbing vulnerability in
app/contact/page.tsxand across the entire application by adding therel="noopener noreferrer"attribute to all external links that usetarget="_blank". Additionally fixed a linting issue inapp/not-found.tsxrelated to JSX comments.If left unfixed, links using
target="_blank"withoutrel="noopener noreferrer"pass a reference to thewindow.openerobject to the newly opened page. A malicious website could use this reference to redirect the original application's page to a phishing site, potentially stealing user credentials or sensitive information.🛡️ Solution:
The fix systematically adds the
rel="noopener noreferrer"attribute to all instances of<a target="_blank">across all files, including:app/contact/page.tsxapp/work/page.tsxapp/work/[slug]/CaseStudyClient.tsxapp/page.tsxThis severs the connection between the newly opened tab and the original tab, completely eliminating the vulnerability. We also ensured the fix didn't break functionality by running lint and build checks.
PR created automatically by Jules for task 15653099920262533727 started by @hatimhtm