Django@4.0.6 vulnerabilities

A high-level Python web framework that encourages rapid development and clean, pragmatic design.

Direct Vulnerabilities

Known vulnerabilities in the Django package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • M
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) due to not accounting for very large inputs involving intermediate ;s, in the django.utils.html.urlize() and django.utils.html.urlizetrunc() template filter functions.

How to fix Denial of Service (DoS)?

Upgrade django to version 4.2.16, 5.0.9, 5.1.1 or higher.

[,4.2.16) [5.0a1,5.0.9) [5.1a1,5.1.1)
  • M
Improper Check for Unusual or Exceptional Conditions

Affected versions of this package are vulnerable to Improper Check for Unusual or Exceptional Conditions due to unhandled email sending failures in the django.contrib.auth.forms.PasswordResetForm class. This allows attackers to enumerate user email addresses by brute forcing password reset requests and observing the outcomes.

How to fix Improper Check for Unusual or Exceptional Conditions?

Upgrade django to version 4.2.16, 5.0.9, 5.1.1 or higher.

[,4.2.16) [5.0a1,5.0.9) [5.1a1,5.1.1)
  • C
SQL Injection

Affected versions of this package are vulnerable to SQL Injection via the QuerySet.values() and values_list() methods on models with a JSONField. An attacker can exploit this vulnerability through column aliases by using a maliciously crafted JSON object object key as a passed *arg.

How to fix SQL Injection?

Upgrade django to version 4.2.15, 5.0.8 or higher.

[,4.2.15) [5.0,5.0.8)
  • M
Uncontrolled Resource Consumption

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption via the floatformat() template filter, when given a string representation of a number in scientific notation with a large exponent.

How to fix Uncontrolled Resource Consumption?

Upgrade django to version 4.2.15, 5.0.8 or higher.

[,4.2.15) [5.0,5.0.8)
  • M
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) via certain inputs with a very large number of Unicode characters in the urlize and urlizetrunc template filters, and the AdminURLFieldWidget widget.

How to fix Denial of Service (DoS)?

Upgrade django to version 4.2.15, 5.0.8 or higher.

[,4.2.15) [5.0,5.0.8)
  • M
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) via very large inputs with a specific sequence of characters in the urlize() and urlizetrunc() template filters.

How to fix Denial of Service (DoS)?

Upgrade django to version 4.2.15, 5.0.8 or higher.

[,4.2.15) [5.0,5.0.8)
  • M
Timing Attack

Affected versions of this package are vulnerable to Timing Attack via the django.contrib.auth.backends.ModelBackend.authenticate() method. This allows remote attackers to enumerate users via a timing attack involving login requests for users with unusable passwords.

How to fix Timing Attack?

Upgrade django to version 4.2.14, 5.0.7 or higher.

[,4.2.14) [5.0a1,5.0.7)
  • M
Directory Traversal

Affected versions of this package are vulnerable to Directory Traversal via the derived classes of the django.core.files.storage.Storage base class which override generate_filename() without replicating the file path validations existing in the parent class. This allows potential access to out of scope data via certain inputs when calling save() method.

Note: Built-in Storage sub-classes were not affected by this vulnerability.

How to fix Directory Traversal?

Upgrade django to version 4.2.14, 5.0.7 or higher.

[,4.2.14) [5.0a1,5.0.7)
  • M
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) in django.utils.translation.get_supported_language_variant() function due to improper user input validation. An attacker can exploit this vulnerability by using very long strings containing specific characters. Exploiting this vulnerability could lead to a system crash.

How to fix Denial of Service (DoS)?

Upgrade django to version 4.2.14, 5.0.7 or higher.

[,4.2.14) [5.0a1,5.0.7)
  • M
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) via the in django.utils.html.urlize() and django.utils.html.urlizetrunc() functions. If certain inputs with a very large number of brackets are provided, this could lead to a system crash.

How to fix Denial of Service (DoS)?

Upgrade django to version 4.2.14, 5.0.7 or higher.

[,4.2.14) [5.0a1,5.0.7)
  • M
Regular Expression Denial of Service (ReDoS)

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in django.utils.text.Truncator.words(), whose performance can be degraded when processing a malicious input involving repeated < characters.

Note:

The function is only vulnerable when html=True is set and the truncatewords_html template filter is in use.

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade django to version 3.2.25, 4.2.11, 5.0.3 or higher.

[,3.2.25) [4.0a1,4.2.11) [5.0a1,5.0.3)
  • M
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) via the NFKC normalization function in django.contrib.auth.forms.UsernameField. A potential attack can be executed via certain inputs with a very large number of Unicode characters.

Note: This vulnerability is only exploitable on Windows systems.

How to fix Denial of Service (DoS)?

Upgrade django to version 3.2.23, 4.1.13, 4.2.7 or higher.

[,3.2.23) [4.0a1,4.1.13) [4.2a1,4.2.7)
  • M
Regular Expression Denial of Service (ReDoS)

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the chars() and words() methods in the django.utils.text.Truncator function. An attacker can cause a denial of service by exploiting the inefficient regular expression complexity, which exhibits linear backtracking complexity and can be slow, given certain long and potentially malformed HTML inputs.

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade django to version 3.2.22, 4.1.12, 4.2.6 or higher.

[,3.2.22) [4.0,4.1.12) [4.2,4.2.6)
  • H
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) in the django.utils.encoding.uri_to_iri() function when processing inputs with a large number of Unicode characters.

How to fix Denial of Service (DoS)?

Upgrade django to version 3.2.21, 4.1.11, 4.2.5 or higher.

[,3.2.21) [4.0a1,4.1.11) [4.2a1,4.2.5)
  • H
Regular Expression Denial of Service (ReDoS)

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) in the EmailValidator and URLValidator classes, when processing a very large number of domain name labels on emails or URLs.

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade django to version 3.2.20, 4.1.10, 4.2.3 or higher.

[,3.2.20) [4.0a1,4.1.10) [4.2a1,4.2.3)
  • H
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) when parsing multipart form data in http/multipartparser.py. An attacker can trigger the opening of a large number of uploaded files which are not subsequently closed, consuming memory or filehandling resources.

How to fix Denial of Service (DoS)?

Upgrade django to version 3.2.18, 4.0.10, 4.1.7 or higher.

[,3.2.18) [4.0a1,4.0.10) [4.1a1,4.1.7)
  • H
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) due to the parsed values of Accept-Language headers which are cached, in order to avoid repetitive parsing. If the raw value of Accept-Language headers is very large, this will cause excessive memory usage.

How to fix Denial of Service (DoS)?

Upgrade django to version 3.2.17, 4.0.9, 4.1.6 or higher.

[3.2,3.2.17) [4.0,4.0.9) [4.1,4.1.6)
  • M
Denial of Service (DoS)

Affected versions of this package are vulnerable to Denial of Service (DoS) when using internationalized URLs, due to locale parameter being interpreted as regular expression.

How to fix Denial of Service (DoS)?

Upgrade django to version 4.1.2, 4.0.8, 3.2.16 or higher.

[4.1a1,4.1.2) [4.0a1,4.0.8) [3.2a1,3.2.16)
  • H
Reflected File Download (RFD)

Affected versions of this package are vulnerable to Reflected File Download (RFD) as it is possible to set the Content-Disposition header of a FileResponse when the filename is derived from user-supplied input.

How to fix Reflected File Download (RFD)?

Upgrade django to version 3.2.15, 4.0.7, 4.1 or higher.

[,3.2.15) [4.0a1,4.0.7) [4.1rc1,4.1)