Skip to content

[Security] Add rel="noopener noreferrer" to external links in Blogs component #323

Description

@Pranav-IIITM

Description

In the Blogs component, author links are set to open in a new tab using target="_blank" but are missing the rel="noopener noreferrer" attribute. Without this, the newly opened tab retains partial access to the window.opener object of the Kmesh site, which is a known security vulnerability that can be exploited for phishing or cross-site attacks. It also causes minor performance issues if the external page runs heavy JavaScript.

Notably, the CNCFInfo component already handles this correctly — this fix brings the Blogs component in line with the same standard.

Affected File

  • src/components/Blogs/index.js (line 47)

Current Behavior

// Current (vulnerable)
<a href={item.url} target="_blank">

Expected Behavior

// Fixed (secure)
<a href={item.url} target="_blank" rel="noopener noreferrer">

Why It Matters

  • Security — Prevents reverse tabnapping attacks where a newly opened tab could access window.opener and redirect the original page to a malicious URL
  • Privacynoreferrer stops the browser from sending the Referer header, preventing the origin URL from leaking to external sites
  • Performancenoopener ensures the new tab runs in a separate process, improving performance in some browsers
  • Consistency — The CNCFInfo component already uses rel="noopener noreferrer" correctly; this fix brings the Blogs component in line with the same standard

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions