Skip to content

security: upgrade marked.js to 4.3.0 - #8319

Merged
unknwon merged 3 commits into
mainfrom
ghsa-jq8v-rmf6-65jw
Jun 4, 2026
Merged

unknwon merged 3 commits into
mainfrom
ghsa-jq8v-rmf6-65jw

Conversation

@unknwon

@unknwon unknwon commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Upgrades the marked Markdown parser used in Jupyter notebook (.ipynb) preview from 0.8.1 to 4.3.0, picking up the upstream URL scheme blocklist that rejects javascript:, vbscript:, and data: links in the default link renderer.

This addresses GHSA-jq8v-rmf6-65jw.

Test plan

  • View a .ipynb file containing a regular Markdown link, confirm it still renders and is clickable.
  • View a .ipynb file containing a Markdown link with a javascript: href, confirm the link is rendered as plain text (no href).
  • View a .ipynb file with a Markdown image, confirm the existing relative-path prefixing still works.

unknwon added 3 commits June 4, 2026 08:59
marked.js does not sanitize URLs in its default link renderer, so a
javascript:, vbscript:, or data: link in a Markdown cell would be re-
introduced after the server-side bluemonday pass. Override renderer.link
to drop the href when the scheme is unsafe.

GHSA-jq8v-rmf6-65jw
@unknwon unknwon added this to the 0.14.3 milestone Jun 4, 2026
@unknwon
unknwon merged commit 17b168b into main Jun 4, 2026
1 check passed
@unknwon
unknwon deleted the ghsa-jq8v-rmf6-65jw branch June 4, 2026 14:12
unknwon added a commit that referenced this pull request Jun 7, 2026
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