Django vulnerabilities
57 known CVE vulnerabilities in Django, translated and rated.
- 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-57833High
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().
- 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.'
- CVE-2026-132809Medium
In Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20, `django.contrib.gis.gdal.OGRGeometry.wkb` allocates an undersized buffer for geometries larger than 4GB on 64-bit platforms. This can cause service degradation when GDAL subsequently writes to it.
- CVE-2026-127929Low
An issue was discovered in Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. The admin changelist allows staff users with view permission on a registered model to enumerate model values via repeated lookup searches using crafted query strings that reference reverse relations. Exploitation requires knowledge of related model names or ForeignKey.related_query_name overrides.
- CVE-2026-125673Low
An issue was discovered in Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. django.middleware.cache.UpdateCacheMiddleware and django.views.decorators.cache.cache_page() are affected by a bug in django.http.HttpRequest.build_absolute_uri(), which incorrectly normalizes request paths containing '.' or '..' segments. Under certain deployment and URL configurations, this allows an unauthenticated attacker to poison the cache, causing cached responses to be served for unintended URLs.
- CVE-2026-124827High
In Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20, `django.contrib.gis.db.models.RasterField` allows creation of files at attacker-controlled locations via the `name` parameter of a data definition. Depending on the raster driver, this could enable remote code execution.
- CVE-2026-119642Low
An issue was discovered in Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. The admin changelist allows staff users with view permission on a registered model with a custom OneToOneField primary key to enumerate related model data via repeated lookup searches using the "pk" alias in the query string.
- CVE-2026-115868Medium
In Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20, the `truncatechars_html` template filter and `django.utils.text.Truncator.chars()` method (with `html=True`) are subject to cross-site scripting (XSS) when certain inputs whose text length matches the truncation length are rendered in an HTML attribute.
- CVE-2026-114582Medium
In Django 6.1 before 6.1.3, 6.0 before 6.0.10, and 5.2 before 5.2.19, django.contrib.gis.gdal.SpatialReference (and related transform() methods and srs/srid setters) do not restrict GDAL's file and network access when parsing string input. This allows attackers to trigger server-side requests or local file reads via crafted spatial reference strings. Earlier unsupported Django series may also be affected.
- CVE-2026-113733Low
In Django 6.1 before 6.1.3 and 6.0 before 6.0.10, django.contrib.admin.utils.display_for_field() did not obfuscate the password field of user models other than AUTH_USER_MODEL, or of an AUTH_USER_MODEL inheriting its password field from a concrete parent model through multi-table inheritance. This allows authenticated staff users with only the view permission on such a model to obtain full password hashes via the read-only change form.
- CVE-2026-113593Low
In Django 6.1 before 6.1.3, 6.0 before 6.0.10, and 5.2 before 5.2.19, django.middleware.cache.UpdateCacheMiddleware and the django.views.decorators.cache.cache_page() decorator generate identical cache keys for requests that omit a header listed in the response's Vary header and requests that include that header with an empty value. This may allow remote attackers to access private data cached for another request.
- CVE-2026-111362Medium
In Django 6.1 before 6.1.3, 6.0 before 6.0.10, and 5.2 before 5.2.19, django.contrib.gis.gdal.OGRGeometry does not restrict external coordinate reference system definitions in GeoJSON input. This allows remote attackers to cause server-side requests to attacker-selected destinations via crafted crs members. Earlier unsupported Django series may also be affected.
- CVE-2026-111211Medium
In Django 6.1 before 6.1.3, 6.0 before 6.0.10, and 5.2 before 5.2.19, django.contrib.gis.forms.widgets.BaseGeometryWidget.deserialize(), used by django.contrib.gis.forms.GeometryField, does not escape invalid submitted values before logging them. This allows remote attackers to inject or forge log entries via a crafted geometry value. Earlier unsupported Django series may also be affected.
- CVE-2026-108147Medium
In Django 6.1 before 6.1.3, 6.0.4 before 6.0.10, and 5.2.13 before 5.2.19, django.http.multipartparser.MultiPartParser is subject to excessive memory consumption when processing multipart file uploads with base64 Content-Transfer-Encoding, which may be buffered entirely in memory before being passed to upload handlers. Earlier unsupported Django series may also be affected.
- CVE-2026-87975Medium
In Django 6.1 before 6.1.2, 6.0 before 6.0.9, and 5.2 before 5.2.18, the function django.forms.models.BaseModelFormSet.save_existing_objects() used the presence of a primary key on a submitted form's instance as evidence that the instance belonged to the formset's limiting queryset. An object outside that queryset can be deleted by an authenticated user without permission on the targeted object, via forged management-form data. Models using the default AutoField primary key are not affected.
- CVE-2026-87890Medium
In Django 6.1 before 6.1.2, 6.0 before 6.0.9, and 5.2 before 5.2.18, an incomplete fix for CVE-2026-15307 in Django spatial lookups allows an attacker who can supply bytes values to cause the Django process to make network requests via a crafted VRT document referencing an external raster source.
- CVE-2026-84429Medium
In Django 6.1 before 6.1.2, 6.0 before 6.0.9, and 5.2 before 5.2.18, the function django.utils.http.parse_header_parameters() is subject to a potential denial-of-service attack due to quadratic time complexity when parsing a value with many separators inside a quoted parameter. An unauthenticated request could reach this parsing through headers such as Accept or Content-Type.
- CVE-2026-77050Medium
In Django 6.1 before 6.1.2, 6.0 before 6.0.9, and 5.2 before 5.2.18, the function django.utils.translation.get_supported_language_variant() is subject to a potential denial-of-service attack when processing many distinct, very long language codes, which are retained as keys in an in-memory cache and consume process memory.
- CVE-2026-15920Medium
An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8. django.contrib.admin.utils.display_for_field() renders URLField values as clickable links in the admin without validating the URL. A value stored with an unsafe scheme is displayed as a link on changelist and read-only admin pages, which allows cross-site scripting against staff users who click the link. Exploitation requires the unsafe value to already be stored in the database. URLField validation through a ModelForm or the admin rejects unsafe schemes, so this affects applications that persist URLField data without running model validation, for example through direct queryset writes, deserialization, or bulk import of untrusted input.
- CVE-2026-15830Medium
An issue was discovered in Django 6.0 before 6.0.9 and 5.2 before 5.2.18. GeoDjango's django.contrib.gis.geos.GEOSGeometry is subject to a potential denial-of-service when parsing deeply nested GEOMETRYCOLLECTION objects supplied as well-known text (WKT), well-known binary (WKB), or hex-encoded WKB, which triggers unbounded recursion and a segmentation fault in the underlying GEOS library. Spatial field lookups and the django.contrib.gis.forms.GeometryField form field are also affected.
- CVE-2026-15337Medium
In Django 5.2 before 5.2.17 and 6.0 before 6.0.8, a denial-of-service vulnerability was discovered in django.utils.translation.check_for_language(), which when given many distinct, very long language codes can lead to excessive memory consumption. These codes can reach the function through the django.views.i18n.set_language() view, which is not routed by default. Memory consumption is bounded by the DATA_UPLOAD_MAX_MEMORY_SIZE setting (default 2.5 MB) and the cache holds a fixed maximum number of entries.
- CVE-2026-15307High
An issue was discovered in Django 5.2 before 5.2.17 and 6.0 before 6.0.8. GeoDjango spatial lookups optimistically parse the right-hand-side value as a raster, allowing a file with attacker-chosen name and contents to be written or an outbound network request to be made. This can lead to remote code execution if the file is written to a location later imported by the application.
- CVE-2026-53878Medium
An issue was discovered in Django 6.0 before 6.0.7 and 5.2 before 5.2.16 where `DomainNameValidator` does not prohibit newlines in domain names. If an application uses such values in HTTP responses, header injection can occur, although Django itself is protected by `HttpResponse`.
- CVE-2026-53877Medium
An issue was discovered in Django 6.0 before 6.0.7 and 5.2 before 5.2.16. `django.contrib.gis.gdal.GDALRaster` over-reads its in-memory buffer when constructed from a bytes object, which can disclose adjacent memory or cause service degradation via a potential segmentation fault when the `vsi_buffer` property is accessed.
- CVE-2026-48588Low
A vulnerability was discovered in Django 6.0 before 6.0.7 and 5.2 before 5.2.16. `UpdateCacheMiddleware` and the `cache_page()` decorator cache responses that vary on cookies even when the incoming request carries unrelated cookies, allowing remote attackers to read private data from the shared cache.
- CVE-2026-8404Low
In Django 5.2 before 5.2.15 and 6.0 before 6.0.6, `django.middleware.cache.UpdateCacheMiddleware` does not match `Cache-Control` response directives case-insensitively. A remote attacker can read responses that were incorrectly cached because their `Cache-Control` directives used uppercase or mixed-case values.
- CVE-2026-7666Low
In Django (versions 6.0 before 6.0.6 and 5.2 before 5.2.15), `EmailBackend` fails to prevent reuse of a partially-initialized connection after a failed STARTTLS handshake when `fail_silently=True`. This allows on-path network attackers to read email content in cleartext.
- CVE-2026-6873Low
Vulnerability in Django (versions 6.0 before 6.0.6 and 5.2 before 5.2.15) in the `get_signed_cookie` function allows an attacker to use a signed cookie in a different context than intended, by manipulating the cookie name and salt argument. This is due to non-injective salt derivation.
- CVE-2026-48587Low
In Django 5.2 before 5.2.15 and 6.0 before 6.0.6, `django.utils.cache.has_vary_header()` does not strip leading or trailing whitespace from `Vary` response header values before comparison. This allows remote attackers to read cached responses via requests to URLs whose responses contain whitespace-padded Vary header values.
- CVE-2026-35193Low
In Django 5.2 before 5.2.15 and 6.0 before 6.0.6, `django.middleware.cache.UpdateCacheMiddleware` does not add `Authorization` to the `Vary` response header for requests bearing that header without `Cache-Control: public`. This allows remote attackers to read private cached responses via unauthenticated requests to the same URL.
- CVE-2026-6907Medium
In Django versions 6.0 before 6.0.5 and 5.2 before 5.2.14, django.middleware.cache.UpdateCacheMiddleware erroneously caches requests where the Vary header contained an asterisk ('*'), which can lead to private data being stored and served.
- CVE-2026-5766Medium
In Django versions 6.0 before 6.0.5 and 5.2 before 5.2.14, ASGI requests with a missing or understated Content-Length header can bypass the FILE_UPLOAD_MAX_MEMORY_SIZE limit, potentially loading large files into memory and causing service degradation.
- CVE-2026-35192Medium
In Django 6.0 before 6.0.5 and 5.2 before 5.2.14, response headers do not vary on cookies when a session is not modified but SESSION_SAVE_EVERY_REQUEST is True. A remote attacker can steal a user's session after the user visits a cached public page. Earlier unsupported series (5.0.x, 4.1.x, 3.2.x) were not evaluated and may also be affected.
- CVE-2026-4292Low
An issue was discovered in Django 6.0 before 6.0.4, 5.2 before 5.2.13, and 4.2 before 4.2.30 where admin changelist forms using ModelAdmin.list_editable incorrectly allowed new instances to be created via forged POST data. Earlier unsupported Django series (5.0.x, 4.1.x, 3.2.x) may also be affected.
- CVE-2026-33033Medium
In Django 6.0 before 6.0.4, 5.2 before 5.2.13, and 4.2 before 4.2.30, the MultiPartParser allows remote attackers to degrade performance by submitting multipart uploads with Content-Transfer-Encoding: base64 containing excessive whitespace. Earlier unsupported Django series may also be affected.
- CVE-2026-25674Low
Django versions 6.0 before 6.0.3, 5.2 before 5.2.12, and 4.2 before 4.2.29 have a race condition in file-system storage and file-based cache backends. An attacker can cause file system objects to be created with incorrect permissions via concurrent requests, where one thread's temporary umask change affects other threads in multi-threaded environments. Earlier unsupported Django series (5.0.x, 4.1.x, 3.2.x) were not evaluated and may also be affected.
- CVE-2026-25673High
In Django 6.0 before 6.0.3, 5.2 before 5.2.12, and 4.2 before 4.2.29, the `URLField.to_python()` function calls `urllib.parse.urlsplit()`, which performs NFKC normalization on Windows. For certain Unicode characters, this normalization is disproportionately slow, allowing a remote attacker to cause a denial of service (DoS) by sending large URLs containing these characters.
- CVE-2026-1312Medium
A SQL injection vulnerability was discovered in Django's `.QuerySet.order_by()` method. The issue occurs when a column alias containing a period is used with `FilteredRelation` and dictionary expansion. Affected versions include 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28; older unsupported series may also be vulnerable.
- CVE-2026-1287Medium
An SQL injection vulnerability was discovered in Django 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28 in `FilteredRelation` column aliases via control characters. A crafted dictionary with dictionary expansion passed as `**kwargs` to `annotate()`, `aggregate()`, `extra()`, `values()`, `values_list()`, and `alias()` methods can be exploited.
- CVE-2025-13473Medium
An issue was discovered in Django 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28. The django.contrib.auth.handlers.modwsgi.check_password() function for authentication via mod_wsgi allows remote attackers to enumerate users via a timing attack. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.
- CVE-2025-64460High
In Django 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27, algorithmic complexity in django.core.serializers.xml_serializer.getInnerText() allows a remote attacker to cause a denial-of-service via CPU and memory exhaustion using specially crafted XML input processed by the XML Deserializer.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

