summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2021-12-27 14:48:03 +0100
committerCarlton Gibson <carlton.gibson@noumenal.es>2022-01-04 10:02:05 +0100
commit968a3d01fa79f055f93a1c3ed1535ecbcbdbb842 (patch)
treeac977466ff6d3ae6daf70389f7895aad4c4e5981 /docs
parentccafad2e429468c518c80fb178f9e7a3f06e78e1 (diff)
Fixed CVE-2021-45115 -- Prevented DoS vector in UserAttributeSimilarityValidator.
Thanks Chris Bailey for the report. Co-authored-by: Adam Johnson <me@adamj.eu>
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/2.2.26.txt14
-rw-r--r--docs/releases/3.2.11.txt14
-rw-r--r--docs/releases/4.0.1.txt14
-rw-r--r--docs/topics/auth/passwords.txt14
4 files changed, 50 insertions, 6 deletions
diff --git a/docs/releases/2.2.26.txt b/docs/releases/2.2.26.txt
index 12e9923a19..3444c491db 100644
--- a/docs/releases/2.2.26.txt
+++ b/docs/releases/2.2.26.txt
@@ -7,4 +7,16 @@ Django 2.2.26 release notes
Django 2.2.26 fixes one security issue with severity "medium" and two security
issues with severity "low" in 2.2.25.
-...
+CVE-2021-45115: Denial-of-service possibility in ``UserAttributeSimilarityValidator``
+=====================================================================================
+
+:class:`.UserAttributeSimilarityValidator` incurred significant overhead
+evaluating submitted password that were artificially large in relative to the
+comparison values. On the assumption that access to user registration was
+unrestricted this provided a potential vector for a denial-of-service attack.
+
+In order to mitigate this issue, relatively long values are now ignored by
+``UserAttributeSimilarityValidator``.
+
+This issue has severity "medium" according to the :ref:`Django security policy
+<security-disclosure>`.
diff --git a/docs/releases/3.2.11.txt b/docs/releases/3.2.11.txt
index b88f0f79ff..621139033c 100644
--- a/docs/releases/3.2.11.txt
+++ b/docs/releases/3.2.11.txt
@@ -7,4 +7,16 @@ Django 3.2.11 release notes
Django 3.2.11 fixes one security issue with severity "medium" and two security
issues with severity "low" in 3.2.10.
-...
+CVE-2021-45115: Denial-of-service possibility in ``UserAttributeSimilarityValidator``
+=====================================================================================
+
+:class:`.UserAttributeSimilarityValidator` incurred significant overhead
+evaluating submitted password that were artificially large in relative to the
+comparison values. On the assumption that access to user registration was
+unrestricted this provided a potential vector for a denial-of-service attack.
+
+In order to mitigate this issue, relatively long values are now ignored by
+``UserAttributeSimilarityValidator``.
+
+This issue has severity "medium" according to the :ref:`Django security policy
+<security-disclosure>`.
diff --git a/docs/releases/4.0.1.txt b/docs/releases/4.0.1.txt
index 8d3c0ae6f2..9429a8afff 100644
--- a/docs/releases/4.0.1.txt
+++ b/docs/releases/4.0.1.txt
@@ -7,6 +7,20 @@ Django 4.0.1 release notes
Django 4.0.1 fixes one security issue with severity "medium", two security
issues with severity "low", and several bugs in 4.0.
+CVE-2021-45115: Denial-of-service possibility in ``UserAttributeSimilarityValidator``
+=====================================================================================
+
+:class:`.UserAttributeSimilarityValidator` incurred significant overhead
+evaluating submitted password that were artificially large in relative to the
+comparison values. On the assumption that access to user registration was
+unrestricted this provided a potential vector for a denial-of-service attack.
+
+In order to mitigate this issue, relatively long values are now ignored by
+``UserAttributeSimilarityValidator``.
+
+This issue has severity "medium" according to the :ref:`Django security policy
+<security-disclosure>`.
+
Bugfixes
========
diff --git a/docs/topics/auth/passwords.txt b/docs/topics/auth/passwords.txt
index a4154095fc..24ee2d5360 100644
--- a/docs/topics/auth/passwords.txt
+++ b/docs/topics/auth/passwords.txt
@@ -607,10 +607,16 @@ Django includes four validators:
is used: ``'username', 'first_name', 'last_name', 'email'``.
Attributes that don't exist are ignored.
- The minimum similarity of a rejected password can be set on a scale of 0 to
- 1 with the ``max_similarity`` parameter. A setting of 0 rejects all
- passwords, whereas a setting of 1 rejects only passwords that are identical
- to an attribute's value.
+ The maximum allowed similarity of passwords can be set on a scale of 0.1
+ to 1.0 with the ``max_similarity`` parameter. This is compared to the
+ result of :meth:`difflib.SequenceMatcher.quick_ratio`. A value of 0.1
+ rejects passwords unless they are substantially different from the
+ ``user_attributes``, whereas a value of 1.0 rejects only passwords that are
+ identical to an attribute's value.
+
+ .. versionchanged:: 2.2.26
+
+ The ``max_similarity`` parameter was limited to a minimum value of 0.1.
.. class:: CommonPasswordValidator(password_list_path=DEFAULT_PASSWORD_LIST_PATH)