Skip to content

🛡️ Sentinel: [HIGH] Fix XSS vulnerability in Markdown rendering - #6

Open
ddqd wants to merge 1 commit into
devfrom
fix-xss-content-markdown-9604236094746019714
Open

🛡️ Sentinel: [HIGH] Fix XSS vulnerability in Markdown rendering#6
ddqd wants to merge 1 commit into
devfrom
fix-xss-content-markdown-9604236094746019714

Conversation

@ddqd

@ddqd ddqd commented Jul 16, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: HIGH
💡 Vulnerability: The ContentMarkdown component parsed markdown using marked and directly injected the HTML into the DOM via innerHTML without sanitization. This allows <script> or javascript: links to execute arbitrary JavaScript (XSS).
🎯 Impact: Attackers could inject malicious scripts into markdown content that is rendered by the ContentMarkdown component, potentially leading to unauthorized actions, data theft, or other malicious activities.
🔧 Fix: Imported DOMPurify from isomorphic-dompurify and used it to sanitize the parsed HTML before it is returned and set to innerHTML.
✅ Verification: Ran bun run build --cwd packages/web to ensure the project builds successfully and the fix is correctly integrated.


PR created automatically by Jules for task 9604236094746019714 started by @ddqd

The `ContentMarkdown` component parsed markdown using `marked` and directly injected the HTML into the DOM via `innerHTML` without sanitization. This allows `<script>` or `javascript:` links to execute arbitrary JavaScript (XSS).

This change imports `DOMPurify` from `isomorphic-dompurify` and uses it to sanitize the parsed HTML before it is returned and set to `innerHTML`.

Co-authored-by: ddqd <[email protected]>
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant