Skip to content

← Public intelligence

PyPI package

django

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

161 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 6.9PyPIAmendedPublished

    Django Incorrect Default Permissions

    CVE-2020-24584 · GHSA-fr28-569j-53c4

    Affected
    • PyPI django >= 2.2, < 2.2.16; >= 3.0, < 3.0.10; >= 3.1, < 3.1.1
    Fixed in
    3.0.103.1.12.2.16· Vendor fix available
    Issue
    An issue was discovered in Django 2.2 before 2.2.16, 3.0 before 3.0.10, and 3.1 before 3.1.1 (when Python 3.7+ is used). The intermediate-level directories of the filesystem cache had the system's standard umask rather than 0o077.

    Recommended action: Upgrade to 3.1.1, 3.0.10 or 2.2.16 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Medium, CVSS 6.9PyPIAmendedPublished

    Django Directory Traversal via archive.extract

    CVE-2021-3281 · GHSA-fvgf-6h6h-3322

    Affected
    • PyPI django >= 2.2, < 2.2.18; >= 3.1, < 3.1.6; >= 3.0, < 3.0.12
    Fixed in
    3.1.62.2.183.0.12· Vendor fix available
    Issue
    In Django 2.2 before 2.2.18, 3.0 before 3.0.12, and 3.1 before 3.1.6, the django.utils.archive.extract method (used by "startapp --template" and "startproject --template") allows directory traversal via an archive with absolute paths or relative paths with dot segments.

    Recommended action: Upgrade to 3.1.6, 3.0.12 or 2.2.18 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Medium, CVSS 5.3PyPIAmendedPublished

    XSS in Django

    CVE-2020-13596 · GHSA-2m34-jcjv-45xf

    Affected
    • PyPI django >= 2.2a1, < 2.2.13; >= 3.0a1, < 3.0.7
    Fixed in
    2.2.133.0.7· Vendor fix available
    Issue
    An issue was discovered in Django version 2.2 before 2.2.13 and 3.0 before 3.0.7. Query parameters generated by the Django admin ForeignKeyRawIdWidget were not properly URL encoded, leading to a possibility of an XSS attack.

    Recommended action: Upgrade to 3.0.7 or 2.2.13 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. High, CVSS 8.2PyPIAmendedPublished

    Data leakage via cache key collision in Django

    CVE-2020-13254 · GHSA-wpjr-j57x-wxfw

    Affected
    • PyPI django >= 2.2, < 2.2.13; >= 3.0, < 3.0.7
    Fixed in
    2.2.133.0.7· Vendor fix available
    Issue
    An issue was discovered in Django version 2.2 before 2.2.13 and 3.0 before 3.0.7. In cases where a memcached backend does not perform key validation, passing malformed cache keys could result in a key collision, and potential data leakage.

    Recommended action: Upgrade to 3.0.7 or 2.2.13 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  5. High, CVSS 8.7PyPIAmendedPublished

    SQL injection in Django

    CVE-2020-9402 · GHSA-3gh2-xw74-jmcw

    Affected
    • PyPI django >= 1.11, < 1.11.29; >= 2.2, < 2.2.11; >= 3.0, < 3.0.4
    Fixed in
    2.2.113.0.41.11.29· Vendor fix available
    Issue
    Django 1.11 before 1.11.29, 2.2 before 2.2.11, and 3.0 before 3.0.4 allows SQL Injection if untrusted data is used as a tolerance parameter in GIS functions and aggregates on Oracle. By passing a suitably crafted tolerance to GIS functions and aggregates on Oracle, it was possible to break escaping and inject malicious SQL.

    Recommended action: Upgrade to 3.0.4, 2.2.11 or 1.11.29 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. Critical, CVSS 9.3PyPIAmendedPublished

    SQL injection in Django

    CVE-2020-7471 · GHSA-hmr4-m2h5-33qx

    Affected
    • PyPI django < 1.11.28; >= 2.0, < 2.2.10; >= 3.0, < 3.0.3
    Fixed in
    2.2.103.0.31.11.28· Vendor fix available
    Issue
    Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection if untrusted data is used as a StringAgg delimiter (e.g., in Django applications that offer downloads of data as a series of rows with a user-specified column delimiter). By passing a suitably crafted delimiter to a contrib.postgres.aggregates.StringAgg instance, it was possible to break escaping and inject malicious SQL.

    Recommended action: Upgrade to 3.0.3, 2.2.10 or 1.11.28 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  7. Critical, CVSS 9.3PyPIAmendedPublished

    Django Potential account hijack via password reset form

    CVE-2019-19844 · GHSA-vfq6-hq5r-27r6

    Affected
    • PyPI django < 1.11.27; >= 2.0, < 2.2.9; >= 3.0, < 3.0.1
    Fixed in
    3.0.11.11.272.2.9· Vendor fix available
    Issue
    Django before 1.11.27, 2.x before 2.2.9, and 3.x before 3.0.1 allows account takeover. A suitably crafted email address (that is equal to an existing user's email address after case transformation of Unicode characters) would allow an attacker to be sent a password reset token for the matched user account. (One mitigation in the new releases is to send password reset tokens only to the registered user email address.)

    Recommended action: Upgrade to 3.0.1, 2.2.9 or 1.11.27 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  8. High, CVSS 7.1PyPIAmendedPublished

    Django allows unintended model editing

    CVE-2019-19118 · GHSA-hvmf-r92r-27hr

    Affected
    • PyPI django >= 2.1, < 2.1.15; >= 2.2, < 2.2.8
    Fixed in
    2.2.82.1.15· Vendor fix available
    Issue
    Django 2.1 before 2.1.15 and 2.2 before 2.2.8 allows unintended model editing. A Django model admin displaying inline related models, where the user has view-only permissions to a parent model but edit permissions to the inline model, would be presented with an editing UI, allowing POST requests, for updating the inline model. Directly editing the view-only parent model was not possible, but the parent model's save() method was called, triggering potential side effects, and causing pre and post-save signal handlers to be invoked. (To resolve this, the Django admin is adjusted to require edit permissions on the parent model in order for inline models to be editable.)

    Recommended action: Upgrade to 2.2.8 or 2.1.15 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  9. Critical, CVSS 9.3PyPIAmendedPublished

    SQL Injection in Django

    CVE-2019-14234 · GHSA-6r97-cj55-9hrq

    Affected
    • PyPI django >= 1.11a1, < 1.11.23; >= 2.1a1, < 2.1.11; >= 2.2a1, < 2.2.4
    Fixed in
    2.2.41.11.232.1.11· Vendor fix available
    Issue
    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. Due to an error in shallow key transformation, key and index lookups for django.contrib.postgres.fields.JSONField, and key lookups for django.contrib.postgres.fields.HStoreField, were subject to SQL injection. This could, for example, be exploited via crafted use of "OR 1=1" in a key or index name to return all records, using a suitably crafted dictionary, with dictionary expansion, as the kwargs passed to the QuerySet.filter() function.

    Recommended action: Upgrade to 2.2.4, 2.1.11 or 1.11.23 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  10. High, CVSS 8.7PyPIAmendedPublished

    Django Denial-of-service in strip_tags()

    CVE-2019-14233 · GHSA-h5jv-4p7w-64jg

    Affected
    • PyPI django >= 1.11a1, < 1.11.23; >= 2.1a1, < 2.1.11; >= 2.2a1, < 2.2.4
    Fixed in
    2.2.41.11.232.1.11· Vendor fix available
    Issue
    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. Due to the behaviour of the underlying HTMLParser, django.utils.html.striptags would be extremely slow to evaluate certain inputs containing large sequences of nested incomplete HTML entities.

    Recommended action: Upgrade to 2.2.4, 2.1.11 or 1.11.23 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  11. High, CVSS 8.7PyPIAmendedPublished

    Uncontrolled Recursion in Django

    CVE-2019-14235 · GHSA-v9qg-3j8p-r63v

    Affected
    • PyPI django >= 1.11a1, < 1.11.23; >= 2.1a1, < 2.1.11; >= 2.2a1, < 2.2.4
    Fixed in
    2.2.41.11.232.1.11· Vendor fix available
    Issue
    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. If passed certain inputs, django.utils.encoding.uritoiri could lead to significant memory usage due to a recursion when repercent-encoding invalid UTF-8 octet sequences.

    Recommended action: Upgrade to 2.2.4, 2.1.11 or 1.11.23 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  12. High, CVSS 8.7PyPIAmendedPublished

    Django Denial-of-service in django.utils.text.Truncator

    CVE-2019-14232 · GHSA-c4qh-4vgv-qc6g

    Affected
    • PyPI django >= 1.11a1, < 1.11.23; >= 2.1a1, < 2.1.11; >= 2.2a1, < 2.2.4
    Fixed in
    2.2.41.11.232.1.11· Vendor fix available
    Issue
    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. If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression. The chars() and words() methods are used to implement the truncatecharshtml and truncatewordshtml template filters, which were thus vulnerable.

    Recommended action: Upgrade to 2.2.4, 2.1.11 or 1.11.23 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  13. High, CVSS 8.7PyPIAmendedPublished

    Django Denial-of-service by filling session store

    CVE-2015-5143 · GHSA-h582-2pch-3xv3

    Affected
    • PyPI django < 1.4.21; >= 1.5, < 1.7.9; >= 1.8, < 1.8.3
    Fixed in
    1.4.211.7.91.8.3· Vendor fix available
    Issue
    The session backends in Django 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 allows remote attackers to cause a denial of service (session store consumption) via multiple requests with unique session keys.

    Recommended action: Upgrade to 1.8.3, 1.7.9 or 1.4.21 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  14. Medium, CVSS 6.9PyPIAmendedPublished

    Django Incorrect HTTP detection with reverse-proxy connecting via HTTPS

    CVE-2019-12781 · GHSA-6c7v-2f49-8h26

    Affected
    • PyPI django >= 2.1, < 2.1.10; >= 2.2, < 2.2.3; >= 1.11, < 1.11.22
    Fixed in
    2.2.31.11.222.1.10· Vendor fix available
    Issue
    An issue was discovered in Django 1.11 before 1.11.22, 2.1 before 2.1.10, and 2.2 before 2.2.3. An HTTP request is not redirected to HTTPS when the SECUREPROXYSSLHEADER and SECURESSLREDIRECT settings are used, and the proxy connects to Django via HTTPS. In other words, django.http.HttpRequest.scheme has incorrect behavior when a client uses HTTP.

    Recommended action: Upgrade to 2.2.3, 2.1.10 or 1.11.22 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  15. Medium, CVSS 5.3PyPIAmendedPublished

    Django Cross-site Scripting in AdminURLFieldWidget

    CVE-2019-12308 · GHSA-7rp2-fm2h-wchj

    Affected
    • PyPI django >= 1.11a1, < 1.11.21; >= 2.1a1, < 2.1.9; >= 2.2a1, < 2.2.2
    Fixed in
    2.2.22.1.91.11.21· Vendor fix available
    Issue
    An issue was discovered in Django 1.11 before 1.11.21, 2.1 before 2.1.9, and 2.2 before 2.2.2. The clickable Current URL value displayed by the AdminURLFieldWidget displays the provided value without validating it as a safe URL. Thus, an unvalidated value stored in the database, or a value provided as a URL query parameter payload, could result in an clickable JavaScript link.

    Recommended action: Upgrade to 2.2.2, 2.1.9 or 1.11.21 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  16. Medium, CVSS 6.1PyPIAmendedPublished

    XSS in jQuery as used in Drupal, Backdrop CMS, and other products

    CVE-2019-11358 · GHSA-6c3j-c64m-qhgq

    Affected
    • PyPI django >= 2.0a1, < 2.1.9; >= 2.2a1, < 2.2.2
    Fixed in
    2.2.22.1.9· Vendor fix available
    Issue
    jQuery from 1.1.4 until 3.4.0, as used in Drupal, Backdrop CMS, and other products, mishandles jQuery.extend(true, {}, ...) because of Object.prototype pollution. If an unsanitized source object contained an enumerable proto property, it could extend the native Object.prototype.

    Recommended action: Upgrade to 2.2.2 or 2.1.9 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  17. High, CVSS 8.7PyPIAmendedPublished

    Uncontrolled Memory Consumption in Django

    CVE-2019-6975 · GHSA-wh4h-v3f2-r2pp

    Affected
    • PyPI django >= 1.11, < 1.11.19; >= 2.0, < 2.0.11; >= 2.1, < 2.1.6
    Fixed in
    2.0.111.11.192.1.6· Vendor fix available
    Issue
    Django 1.11.x before 1.11.19, 2.0.x before 2.0.11, and 2.1.x before 2.1.6 allows Uncontrolled Memory Consumption via a malicious attacker-supplied value to the django.utils.numberformat.format() function.

    Recommended action: Upgrade to 2.1.6, 2.0.11 or 1.11.19 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  18. High, CVSS 7.1PyPIAmendedPublished

    Improper Input Validation in Django

    CVE-2019-3498 · GHSA-337x-4q8g-prc5

    Affected
    • PyPI django >= 1.11a1, < 1.11.18; >= 2.0a1, < 2.0.10; >= 2.1a1, < 2.1.5
    Fixed in
    2.0.102.1.51.11.18· Vendor fix available
    Issue
    In Django 1.11.x before 1.11.18, 2.0.x before 2.0.10, and 2.1.x before 2.1.5, an Improper Neutralization of Special Elements in Output Used by a Downstream Component issue exists in django.views.defaults.pagenotfound(), leading to content spoofing (in a 404 error page) if a user fails to recognize that a crafted URL has malicious content.

    Recommended action: Upgrade to 2.1.5, 2.0.10 or 1.11.18 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  19. Medium, CVSS 5.3PyPIAmendedPublished

    Django vulnerable to XSS on 500 pages

    CVE-2017-12794 · GHSA-9r8w-6x8c-6jr9

    Affected
    • PyPI django >= 1.10a1, < 1.10.8; >= 1.11a1, < 1.11.5
    Fixed in
    1.10.81.11.5· Vendor fix available
    Issue
    In Django 1.10.x before 1.10.8 and 1.11.x before 1.11.5, HTML autoescaping was disabled in a portion of the template for the technical 500 debug page. Given the right circumstances, this allowed a cross-site scripting attack. This vulnerability shouldn't affect most production sites since you shouldn't run with DEBUG = True (which makes this page accessible) in your production settings.

    Recommended action: Upgrade to 1.11.5 or 1.10.8 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  20. Medium, CVSS 5.3PyPIAmendedPublished

    Django open redirect and possible XSS attack via user-supplied numeric redirect URLs

    CVE-2017-7233 · GHSA-37hp-765x-j95x

    Affected
    • PyPI django >= 1.10a1, < 1.10.7; >= 1.9a1, < 1.9.13; >= 1.8a1, < 1.8.18
    Fixed in
    1.9.131.10.71.8.18· Vendor fix available
    Issue
    Django 1.10 before 1.10.7, 1.9 before 1.9.13, and 1.8 before 1.8.18 relies on user input in some cases to redirect the user to an "on success" URL. The security check for these redirects (namely django.utils.http.issafeurl()) considered some numeric URLs "safe" when they shouldn't be, aka an open redirect vulnerability. Also, if a developer relies on issafeurl() to provide safe redirect targets and puts such a URL into a link, they could suffer from an XSS attack.

    Recommended action: Upgrade to 1.10.7, 1.9.13 or 1.8.18 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  21. Medium, CVSS 5.3PyPIAmendedPublished

    Django open redirect

    CVE-2017-7234 · GHSA-h4hv-m4h4-mhwg

    Affected
    • PyPI django >= 1.10, < 1.10.7; >= 1.9, < 1.9.13; >= 1.8, < 1.8.18
    Fixed in
    1.9.131.10.71.8.18· Vendor fix available
    Issue
    A maliciously crafted URL to a Django (1.10 before 1.10.7, 1.9 before 1.9.13, and 1.8 before 1.8.18) site using the django.views.static.serve() view could redirect to any other domain, aka an open redirect vulnerability.

    Recommended action: Upgrade to 1.10.7, 1.9.13 or 1.8.18 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  22. Medium, CVSS 6.9PyPIAmendedPublished

    Django denial-of-service possibility in urlize and urlizetrunc template filters

    CVE-2018-7536 · GHSA-r28v-mw67-m5p9

    Affected
    • PyPI django >= 2.0a1, < 2.0.3; >= 1.11a1, < 1.11.11; >= 1.8a1, < 1.8.19
    Fixed in
    1.8.192.0.31.11.11· Vendor fix available
    Issue
    An issue was discovered in Django 2.0 before 2.0.3, 1.11 before 1.11.11, and 1.8 before 1.8.19. The django.utils.html.urlize() function was extremely slow to evaluate certain inputs due to catastrophic backtracking vulnerabilities in two regular expressions (only one regular expression for Django 1.8.x). The urlize() function is used to implement the urlize and urlizetrunc template filters, which were thus vulnerable.

    Recommended action: Upgrade to 2.0.3, 1.11.11 or 1.8.19 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  23. Low, CVSS 2.7PyPIAmendedPublished

    Django Denial-of-service possibility in truncatechars_html and truncatewords_html template filters

    CVE-2018-7537 · GHSA-2f9x-5v75-3qv4

    Affected
    • PyPI django >= 2.0, < 2.0.3; >= 1.11, < 1.11.11; >= 1.8, < 1.8.19
    Fixed in
    1.8.192.0.31.11.11· Vendor fix available
    Issue
    An issue was discovered in Django 2.0 before 2.0.3, 1.11 before 1.11.11, and 1.8 before 1.8.19. If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression. The chars() and words() methods are used to implement the truncatecharshtml and truncatewordshtml template filters, which were thus vulnerable.

    Recommended action: Upgrade to 2.0.3, 1.11.11 or 1.8.19 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  24. Medium, CVSS 5.3PyPIAmendedPublished

    Django open redirect

    CVE-2018-14574 · GHSA-5hg3-6c2f-f3wr

    Affected
    • PyPI django >= 2.0, < 2.0.8; >= 1.11, < 1.11.15
    Fixed in
    2.0.81.11.15· Vendor fix available
    Issue
    django.middleware.common.CommonMiddleware in Django 1.11.x before 1.11.15 and 2.0.x before 2.0.8 has an Open Redirect.

    Recommended action: Upgrade to 2.0.8 or 1.11.15 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  25. High, CVSS 8.7PyPIAmendedPublished

    Django vulnerable to information leakage in AuthenticationForm

    CVE-2018-6188 · GHSA-rf4j-j272-fj86

    Affected
    • PyPI django >= 1.11.8, < 1.11.10; >= 2.0a1, < 2.0.2
    Fixed in
    1.11.102.0.2· Vendor fix available
    Issue
    django.contrib.auth.forms.AuthenticationForm in Django 2.0 before 2.0.2, and 1.11.8 and 1.11.9, allows remote attackers to obtain potentially sensitive information by leveraging data exposure from the confirmloginallowed() method, as demonstrated by discovering whether a user account is inactive.

    Recommended action: Upgrade to 2.0.2 or 1.11.10 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →