CVE-2024-21535
JavaScript vulnerability analysis and mitigation

Overview

CVE-2024-21535 affects versions of the package markdown-to-jsx before 7.4.0. The vulnerability is a Cross-site Scripting (XSS) issue that occurs via the src property due to improper input sanitization. The vulnerability was disclosed on February 20, 2024, and published on October 14, 2024. The affected software is the markdown-to-jsx package, which is a lightweight, customizable React markdown component (Snyk Advisory, NVD).

Technical details

The vulnerability stems from insufficient input sanitization of the src property in markdown-to-jsx. An attacker can execute arbitrary code by injecting a malicious iframe element in the markdown. The vulnerability has been assigned a CVSS v3.1 Base Score of 6.1 (MEDIUM) with the following vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N. The issue was addressed in version 7.4.0 by ensuring proper sanitization of the src property (Snyk Advisory, GitHub Patch).

Impact

The vulnerability can allow attackers to perform Cross-site Scripting (XSS) attacks. When successfully exploited, this can lead to the execution of arbitrary code in the context of the user's browser, potentially compromising user sessions, stealing cookies, or exposing sensitive information (Snyk Advisory).

Mitigation and workarounds

The primary mitigation is to upgrade markdown-to-jsx to version 7.4.0 or higher, which includes the security fix. The fix ensures proper sanitization of the src property to prevent XSS attacks (GitHub Patch, Snyk Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-vr6p-vq2p-6j74CRITICAL10
  • JavaScriptJavaScript
  • likec4
NoNoDec 15, 2025
CVE-2025-67750HIGH8.4
  • JavaScriptJavaScript
  • lightning-flow-scanner
NoYesDec 12, 2025
CVE-2025-66402HIGH7.1
  • JavaScriptJavaScript
  • misskey-js
NoYesDec 16, 2025
CVE-2025-66482MEDIUM6.9
  • JavaScriptJavaScript
  • misskey-js
NoYesDec 16, 2025
CVE-2025-68113MEDIUM6.5
  • JavaScriptJavaScript
  • altcha-org/altcha
NoYesDec 16, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management