Vulnerability · Published Oct 15, 2024 · Assigned by snyk

CVE-2024-21535

Medium 6.1

In plain English

A medium-severity cross-site scripting in markdown-to-jsx. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.5%top 55.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

Versions of the package markdown-to-jsx before 7.4.0 are vulnerable to Cross-site Scripting (XSS) via the src property due to improper input sanitization. An attacker can execute arbitrary code by injecting a malicious iframe element in the markdown.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13node-markdown-to-jsx7.2.0+dfsg-3DEBIAN-CVE-2024-21535
Debian:14node-markdown-to-jsx7.2.0+dfsg-3DEBIAN-CVE-2024-21535
Ubuntu:24.04:LTSnode-markdown-to-jsxno fix listedUBUNTU-CVE-2024-21535
Ubuntu:25.10node-markdown-to-jsxno fix listedUBUNTU-CVE-2024-21535
Ubuntu:26.04:LTSnode-markdown-to-jsxno fix listedUBUNTU-CVE-2024-21535
Ubuntu:26.10node-markdown-to-jsxno fix listedUBUNTU-CVE-2024-21535
npmmarkdown-to-jsx7.4.0GHSA-4wx3-54gh-9fr9

Affected products (as reported)

VendorProductVersions
n/a markdown-to-jsx 0 – before 7.4.0

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P

References