CVE-2019-14233: Django HTMLParser Vulnerability
Summary
CVE-2019-14233: An issue was discovered in Django 1.11.x before 1.11.23, 2.1.x before 2.1.11, and 2.2.x before 2.2.4. Affects django across 3 version ranges.
>= 1.11, < 1.11.23
>= 2.1, < 2.1.11
>= 2.2, < 2.2.4
Fixed in 1.11.23, 2.1.11 or 2.2.4, depending on the release line you run. How to fix ↓
Also tracked for
- py-django · Alpine:v3.10
The same CVE-2019-14233 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Django is a popular Python web framework that simplifies the development of web applications. It provides various features and tools for handling web requests, managing databases, and rendering dynamic content. This vulnerability affects Django versions 1.11.x, 2.1.x, and 2.2.x. The vulnerability arises due to the behavior of the underlying HTMLParser used by Django's django.utils.html.strip_tags function. Specifically, when evaluating certain inputs containing large sequences of nested incomplete HTML entities, the function becomes extremely slow.
Vulnerability Detail
The vulnerability in Django's HTMLParser can lead to significant performance issues when processing certain inputs. Attackers could potentially exploit this vulnerability to launch denial-of-service attacks by submitting specially crafted input that triggers the slow evaluation of strip_tags. This could result in resource exhaustion and impact the availability of the affected Django application. It is important to note that this vulnerability does not directly allow for remote code execution or unauthorized access to sensitive information.
How To Fix
Latest published version: 6.1.2 as of 22 Oct 2026
pip install --upgrade "django==6.1.2"
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 1.11, < 1.11.231.11.23pip install --upgrade "django==1.11.23" -
>= 2.1, < 2.1.112.1.11pip install --upgrade "django==2.1.11" -
>= 2.2, < 2.2.42.2.4pip install --upgrade "django==2.2.4"
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a workaround, developers can manually implement a custom function to strip HTML tags from input, instead of relying on Django's strip_tags. Here is an example of a simple implementation in Python:
import re
def strip_tags(input_string):
return re.sub('<[^<]+?>', '', input_string)
Conclusion
The Django HTMLParser vulnerability (CVE-2019-14233) can result in significant performance issues and potential denial-of-service attacks. It is crucial to upgrade Django to the fixed versions or implement the provided workaround to mitigate the risk. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for django →
FAQ
Django versions 1.11.x, 2.1.x, and 2.2.x are affected.
The vulnerability can lead to denial-of-service attacks, causing performance issues and resource exhaustion in affected Django applications.
No, this vulnerability does not directly allow for remote code execution or unauthorized access to sensitive information.
Yes, developers can implement a custom function to strip HTML tags as a workaround.
To fix this vulnerability, upgrade Django to the recommended versions: 1.11.23, 2.1.11, or 2.2.4.
Related vulnerabilities
Recent vulnerabilities recorded for django.