md-editor-v3 is vulnerable to Cross-Site Scripting (XSS)
61
CVE Score
Medium
Cross-Site Scripting (XSS)
The Markdown preview renderer in MdPreview interpolates a fenced code block's language info string into HTML attributes without escaping it. A crafted info string on a code fence breaks out of the attribute and injects arbitrary markup, so JavaScript executes in the page origin when the preview is rendered. The bundled XSSPlugin does not stop this because it only inspects pre-existing HTML tokens and never sees the markup produced by the highlight callback, so hosted Markdown becomes stored cross-site scripting. The fix escapes the language value with escapeHtml and quotes the attribute before interpolation.
Upgrade the md-editor-v3 library to the patch version.
You are affected if your application uses MdPreview (or the MdEditor preview) to render Markdown that comes from untrusted or externally influenced sources on any release up to and including 6.5.3. Enabling the bundled XSSPlugin does not protect you, because the malicious markup is emitted by the fenced-code highlight renderer and never passes through the sanitized HTML tokens the plugin inspects. Applications that only render fully trusted, first-party Markdown are not at practical risk.
0.0.1 - 6.5.3
Fixed in 6.5.4md-editor-v3 is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 6.5.3.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.