Skip to content

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

Open
ddqd wants to merge 1 commit into
devfrom
sentinel-fix-markdown-xss-9589431379939761437
Open

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

Conversation

@ddqd

@ddqd ddqd commented Jul 17, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: HIGH
💡 Vulnerability: XSS vulnerability in packages/web/src/components/share/content-markdown.tsx where raw markdown parsed by marked was directly injected via innerHTML without sanitization.
🎯 Impact: Malicious users could execute arbitrary JavaScript via specially crafted markdown content when shared or viewed in the web application.
🔧 Fix: Introduced isomorphic-dompurify to sanitize the HTML string before passing it to innerHTML. Using the isomorphic version ensures compatibility with SSR contexts (like Astro).
✅ Verification: Build the web package and ensure the application starts up correctly. A payload like <script>alert(1)</script> in the markdown will now be stripped.


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

- Added `isomorphic-dompurify` to `packages/web`
- Sanitized `marked` output in `ContentMarkdown` component before rendering via `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