security: migrate from markdown to marked (ReDoS fix)#7735
Open
wtfiwtz wants to merge 3 commits into
Open
Conversation
Replace the deprecated and vulnerable markdown package with marked to address ReDoS (Regular Expression Denial of Service) vulnerabilities. Changes: - package.json: Remove markdown 0.5.0, add marked ^4.3.0 - TextboxDialog.jsx: Replace markdown.toHTML() → marked.parse() - TextboxWidget.jsx: Replace markdown.toHTML() → marked.parse() - VisualizationWidget.jsx: Replace markdown.toHTML() → marked.parse() - VisualizationEmbed.jsx: Replace markdown.toHTML() → marked.parse() - Add empty string fallback (text || "") to prevent null/undefined errors - Regenerate pnpm-lock.yaml CVEs Addressed: - GHSA-wx77-rp39-c6vg: ReDoS vulnerability in markdown package The markdown package (0.5.0) is deprecated and contains a ReDoS vulnerability with no available fix. The marked package is a modern, actively maintained alternative with better security and performance. Code Changes: All markdown.toHTML(text) calls have been replaced with marked.parse(text || "") to ensure safe handling of null/undefined values while maintaining identical HTML output for dashboard textboxes and query descriptions. Test Results: - Frontend tests: ✓ All 15 test suites passed (90 tests) - TypeScript compilation: ✓ Type checking passed Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the deprecated and vulnerable markdown package with marked to address ReDoS (Regular Expression Denial of Service) vulnerabilities.
Changes
CVEs Addressed
The markdown package (0.5.0) is deprecated and contains a ReDoS vulnerability with no available fix. The marked package is a modern, actively maintained alternative with better security and performance.
Code Changes
All
markdown.toHTML(text)calls have been replaced withmarked.parse(text || "")to ensure safe handling of null/undefined values while maintaining identical HTML output for dashboard textboxes and query descriptions.Test Results
Related PRs
Part of the frontend security upgrade series split from #7720:
Made with Cursor