home / blog
2026-11-28 · medium
CVE-2024-2319: XSS Vulnerability in Django MarkdownX
XSS vulnerability in Django Markdownx 4.0.2: risk for sites using the content editor.

The CVE-2024-2319 vulnerability concerns an XSS (Cross-Site Scripting) flaw in the Django Markdownx project version 4.0.2. An attacker can store a specially crafted JavaScript payload in the upload functionality due to lack of proper sanitization of JavaScript elements. This vulnerability affects websites that use this library for content management.
The severity of the vulnerability is classified as medium with a CVSS score of 5.4. It was officially published in the National Vulnerability Database on March 8, 2024. Recently, a non-destructive proof of concept has been released that demonstrates how to exploit the vulnerability.
To protect against this vulnerability, it is recommended to update Django Markdownx to a version after 4.0.2 that is not affected by the flaw. If immediate update is not possible, it is advisable to implement additional filters for markdown content sanitization, especially for JavaScript elements, and to restrict access to the upload functionality to trusted users only.
At a glance
- What
- XSS vulnerability in Django MarkdownX allowing JavaScript code injection
- Severity
- CVSS 5.4 (medium)
- Affected versions
- 4.0.2
- Fix
- Not reported
- Status
- Vulnerability confirmed in NVD
- Action
- Apply patch by updating to versions after 4.0.2
Sources: NVD, CVE-2024-2319