CVE-2025-57833
HighCVSS 7.1Exploitation Probability (EPSS)
Very high risk98th percentile - higher than 98% of all known CVEs
Summary
Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6 are subject to SQL injection in FilteredRelation column aliases. The attack vector uses a suitably crafted dictionary with dictionary expansion as **kwargs passed to QuerySet.annotate() or QuerySet.alias().
Risk Assessment
An attacker could inject malicious SQL, potentially leading to unauthorized data access or modification.
Recommendation
Update Django to 4.2.24, 5.1.12, 5.2.6 or later and review code for unsafe data passed to annotate()/alias().
Other vulnerabilities in Django
See all- CVE-2026-132092Critical
In Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20, the `range` and `in` lookups are subject to SQL injection in queries involving aliases or key transforms containing percent signs. Earlier unsupported Django series may also be affected.
- CVE-2026-1207Medium
In Django 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28, a vulnerability was found in raster lookups on RasterField (PostGIS only). Remote attackers can inject SQL via the band index parameter.
- CVE-2025-64459Critical
Django versions 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8 contain a SQL injection vulnerability. The QuerySet.filter(), QuerySet.exclude(), QuerySet.get() methods and the Q() class are vulnerable when a suitably crafted dictionary with dictionary expansion is used as the _connector argument.
- CVE-2025-32873Medium
An issue was discovered in Django 4.2 before 4.2.21, 5.1 before 5.1.9, and 5.2 before 5.2.1. The django.utils.html.strip_tags() function is vulnerable to a potential denial-of-service (slow performance) when processing inputs containing large sequences of incomplete HTML tags. The template filter striptags is also vulnerable, because it is built on top of strip_tags().
- CVE-2016-9014High
Django versions before 1.8.16, 1.9.11, and 1.10.3, when DEBUG is enabled, allow remote attackers to conduct DNS rebinding attacks due to failure to validate the HTTP Host header against ALLOWED_HOSTS.
- CVE-2016-9013Critical
Django versions 1.8.x before 1.8.16, 1.9.x before 1.9.11, and 1.10.x before 1.10.3 use a hardcoded password for a temporary database user, making it easier for remote attackers to gain access to the database server.
- CVE-2016-7401High
The cookie parsing code in Django before 1.8.15 and 1.9.x before 1.9.10, when used on a site with Google Analytics, allows remote attackers to bypass an intended CSRF protection mechanism by setting arbitrary cookies.
- CVE-2016-2512High
The utils.http.is_safe_url function in Django before 1.8.10 and 1.9.x before 1.9.3 allows remote attackers to redirect users to arbitrary web sites. This can lead to phishing attacks or potentially cross-site scripting (XSS) attacks via a URL containing basic authentication.
- CVE-2015-5143High
Django versions before 1.4.21, 1.5.x through 1.6.x, 1.7.x before 1.7.9, and 1.8.x before 1.8.3 are vulnerable to denial of service attacks. Attackers can exploit unique session keys to consume session store resources.
- CVE-2014-0474High
In Django versions before 1.4.11, 1.5.x before 1.5.6, 1.6.x before 1.6.3, and 1.7.x before 1.7 beta 2, the FilePathField, GenericIPAddressField, and IPAddressField model field classes do not properly perform type conversion. This may allow remote attackers to have unspecified impact related to 'MySQL typecasting.'
Original NVD description (English source)
An issue was discovered in Django 4.2 before 4.2.24, 5.1 before 5.1.12, and 5.2 before 5.2.6. FilteredRelation is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the **kwargs passed QuerySet.annotate() or QuerySet.alias().
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

