CVE-2024-21535
Cross site scripting in markdown-to-jsx
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
6.1
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.
- Record
CVE-2024-21535- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2024-2940
6.1
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.
- Record
EUVD-2024-2940- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-4wx3-54gh-9fr9
5.3
Cross site scripting in markdown-to-jsx
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.
- Record
GHSA-4wx3-54gh-9fr9- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
6.1
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.
- Record
CVE-2024-21535- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
6.1
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.
- Record
CVE-2024-21535- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:P - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2024-21535
6.1
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.
- Record
DEBIAN-CVE-2024-21535- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
OSVGHSA-4wx3-54gh-9fr9
5.3
Cross site scripting in markdown-to-jsx
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.
- Record
GHSA-4wx3-54gh-9fr9- CVSS 4.0
- 5.3 Medium
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2024-21535
6.1
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.
- Record
UBUNTU-CVE-2024-21535- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
markdown-to-jsxnpm |
before 7.4.0 | 7.4.0 |
node-markdown-to-jsxDebian:13 |
before 7.2.0+dfsg-3 | 7.2.0+dfsg-3 |
node-markdown-to-jsxDebian:14 |
before 7.2.0+dfsg-3 | 7.2.0+dfsg-3 |
node-markdown-to-jsxUbuntu:24.04:LTS |
All versions, plus listed versions 7.2.0+dfsg-2 |
None known |
node-markdown-to-jsxUbuntu:25.10 |
All versions, plus listed versions 7.2.0+dfsg-27.2.0+dfsg-3 |
None known |
node-markdown-to-jsxUbuntu:26.10 |
All versions, plus listed versions 7.2.0+dfsg-37.2.0+dfsg-4 |
None known |
node-markdown-to-jsxUbuntu:26.04:LTS |
All versions, plus listed versions 7.2.0+dfsg-3 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-21535 is a medium vulnerability (CVSS 6.1) in Markdown-to-jsx, published October 15, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.52%, the 44th percentile. Fixed in markdown-to-jsx 7.4.0.
References
security.snyk.io/vuln/SNYK-JS-MARKDOWNTOJSX-6258886
github.com/quantizor/markdown-to-jsx/commit/8eb74da825c0d8d2e9508d73c672bcae36ba555a
nvd.nist.gov/vuln/detail/CVE-2024-21535
github.com/advisories/GHSA-4wx3-54gh-9fr9
github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21535.json
security-tracker.debian.org/tracker/CVE-2024-21535
github.com/quantizor/markdown-to-jsx
ubuntu.com/security/CVE-2024-21535
cve.org/CVERecord?id=CVE-2024-21535