Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Milkdown before 7.21.3 contains a stored cross-site scripting vulnerability in the @milkdown/preset-commonmark and @milkdown/components packages… (CVE-2026-57530)

0
Medium
Published: 07/24/2026 (07/24/2026, 21:32:22 UTC)
Source: GCVE Database

Description

Milkdown versions before 7.21.3 contain a stored cross-site scripting (XSS) vulnerability in the @milkdown/preset-commonmark and @milkdown/components packages. This vulnerability allows attackers with document write access to inject arbitrary JavaScript that executes in the browser context of users who open the affected document or interact with rendered links. The issue arises because raw URL values from the remark AST are stored as href attributes without validating the URL scheme, and the DOMPurify.sanitize call fails to properly sanitize these URLs, allowing javascript: payloads to bypass filtering in link previews and anchor elements.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
Scope
X
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Affected software

Affected versions
<7.21.3

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/25/2026, 23:54:26 UTC

Technical Analysis

The vulnerability in Milkdown before version 7.21.3 is a stored cross-site scripting issue affecting the @milkdown/preset-commonmark and @milkdown/components packages. It occurs because the parseMarkdown runner stores raw URL values from the remark AST as href mark attributes without validating the URL scheme. Additionally, the DOMPurify.sanitize function used in edit-view.ts does not effectively sanitize these URLs, treating them as text nodes and allowing malicious javascript: URLs to pass through unmodified. This enables attackers with write access to documents to execute arbitrary JavaScript in the browser context of users who view or interact with the document, leading to potential XSS attacks.

Potential Impact

An attacker with the ability to write to a document can inject malicious JavaScript code that executes in the browsers of users who open the document or click on rendered links. This can lead to cross-site scripting attacks, potentially compromising user sessions, stealing sensitive information, or performing actions on behalf of the user within the affected application context.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Users should upgrade to Milkdown version 7.21.3 or later once available. Until then, restrict document write access to trusted users only to reduce the risk of exploitation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-f8jw-52vm-m867
Osv Schema Version
1.4.0
Aliases
["CVE-2026-57530"]
Ecosystems
[]
Database Specific Severity
MODERATE
Cvss Version
4.0

Threat ID: 6a6542289c2644c7f808a01a

Added to database: 07/25/2026, 23:09:28 UTC

Last enriched: 07/25/2026, 23:54:26 UTC

Last updated: 07/26/2026, 06:14:50 UTC

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses