You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inline markdown renderer renders javascript: link hrefs #3858
Found while reviewing the markdown table renderer (PR #3856); the behaviour is pre-existing
The shared inline markdown renderer used for node display turns a link such as [click](javascript:alert(1)) into an anchor with the javascript: URL as its href. Raw HTML is escaped, but the href is not checked. app-shell.svelte (around lines 471 to 500) only intercepts clicks on http(s) and nodespace:// links, so a click on another scheme is left to the webview.
Why it matters
Node content is synced between members of a workspace (NodeSpace Sync), so another member's note can carry such a link.
Proposed change
Allow only a safe set of schemes (http, https, mailto, nodespace) when rendering a link href, and render anything else as plain text. Add tests for javascript:, data:, vbscript:, mixed case and whitespace/control-character variants.
Acceptance
A link with an unsafe scheme is never rendered as a clickable anchor.
Fixed by #3863 (merged 2026-10-21): shared isSafeLinkHref allow-list (http, https, mailto, nodespace, scheme-less) applied in marked-config, chat-markdown, markdown-utils.processLinks and markdown-renderer.svelte; unsafe links render as label text. Tests cover javascript/data/vbscript/file, mixed case and control/whitespace/zero-width variants. Remaining defence-in-depth items are in #3864.
Activity
mstomar125 commentedon Oct 21, 2026
Claiming: fixing in a PR together with the deferred review nits from #3853.
Close view-mode link sink, decode entities in href check, harden stam…
Sanitize raw-HTML URLs in chat, tidy extraction error paths
Allow-list link schemes in markdown renderers; refresh sidecar stamp …
Close view-mode link sink, decode entities in href check, harden stam…
Sanitize raw-HTML URLs in chat, tidy extraction error paths
Allow-list markdown link schemes; stamp refresh nit from #3853 (#3863)
mstomar125 commentedon Oct 22, 2026
Fixed by #3863 (merged 2026-10-21): shared isSafeLinkHref allow-list (http, https, mailto, nodespace, scheme-less) applied in marked-config, chat-markdown, markdown-utils.processLinks and markdown-renderer.svelte; unsafe links render as label text. Tests cover javascript/data/vbscript/file, mixed case and control/whitespace/zero-width variants. Remaining defence-in-depth items are in #3864.