Skip to content

security(browser-extension): fix DOM-based XSS vulnerability#838

Open
akhilesharora wants to merge 1 commit intosupermemoryai:mainfrom
akhilesharora:security/fix-dom-xss-browser-extension-v2
Open

security(browser-extension): fix DOM-based XSS vulnerability#838
akhilesharora wants to merge 1 commit intosupermemoryai:mainfrom
akhilesharora:security/fix-dom-xss-browser-extension-v2

Conversation

@akhilesharora
Copy link
Copy Markdown

Summary

Fixes critical DOM-based XSS vulnerability in browser extension content scripts.

Continuation of #459 with feedback addressed.

Changes

  • Remove HTML wrappers (<div>, <br>) from stored memories - fixes the visible HTML tags issue
  • Replace innerHTML with document.createTextNode() - prevents XSS
  • Fix all three content scripts: chatgpt.ts, claude.ts, t3.ts

Feedback Addressed

  • ✅ Fixed UI issue with <div> tags appearing in prompt (MaheshtheDev)
  • ✅ Fixed t3.ts which was missed in original PR
  • ✅ Using createTextNode() instead of wrapper elements

@graphite-app graphite-app bot added the extension related to Supermemory Chrome Extension label Apr 8, 2026
@graphite-app graphite-app bot requested a review from Dhravya April 8, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension related to Supermemory Chrome Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant