Commit Graph

28 Commits

Author SHA1 Message Date
Gyorgy Sarvari
2e331249b2 python3-django: implement group method for FakeMatch
This change is for python3-django_2.2.28.

This patch is an extension for CVE-2024-27351.patch. The class that patch
introduced wasn't completely suitable for this version of the recipe, because
it was accessing a function of it that was not implemented (the upstream
version that introduced this class did not use that function, it is specific
to this old version).

This patch adds the missing implementation to avoid errors.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2026-01-15 13:50:51 +01:00
Gyorgy Sarvari
4638d0ee22 python3-django: fix regression from CVE-2024-24680 patch
This change is for python3-django_2.2.28.

The patch that mitigated CVE-2024-246680 accidentally also brought
a regression, some numbers were converted to (human-friendly) string incorrectly.

This backported patch mitigates this problem.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2026-01-15 13:50:49 +01:00
Gyorgy Sarvari
75a627cd00 python3-django: fix intendation error in CVE patch
This change is for python3-django_2.2.28.

This patch contains an incorrect intendation, making the tests fail.
This change fixes that.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2026-01-15 13:50:48 +01:00
Haixiao Yan
c1d50d3e50 python3-django: Fix missing JSONField in django.db.models
Fix the following error introduced by CVE-2024-42005.patch:

AttributeError: module 'django.db.models' has no attribute 'JSONField'

The patch assumes JSONField is available from django.db.models, which
is not the case for this Django version.

Revert the changes in the following files to restore compatibility:
tests/expressions/models.py
tests/expressions/test_queryset_values.py

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2026-01-15 13:45:13 +01:00
Haixiao Yan
bca6ddaa0d python3-django: Fix undefined _lazy_re_compile
Fix the following error introduced by CVE-2024-27351.patch and
CVE-2025-32873.patch:

NameError: name '_lazy_re_compile' is not defined

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2026-01-15 13:45:04 +01:00
Haixiao Yan
0d50915759 python3-django: fix CVE-2025-64459
The methods QuerySet.filter(), QuerySet.exclude(), and QuerySet.get(), and the
class Q() were subject to SQL injection when using a suitably crafted
dictionary, with dictionary expansion, as the _connector argument.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-64459
https://shivasurya.me/security/django/2025/11/07/django-sql-injection-CVE-2025-64459.html

Upstream-patch:
98e642c691

Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-12-18 09:10:52 +01:00
Saravanan
e2da1298ac python3-django: fix CVE-2025-32873
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-32873

Upstream-patch:
9cd8028f3e/

Signed-off-by: Saravanan <saravanan.kadambathursubramaniyam@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-12-05 15:29:59 +01:00
Saravanan
8b438a9d7b python3-django: fix CVE-2024-39330
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-39330

Upstream-patch:
2b00edc015

Signed-off-by: Saravanan <saravanan.kadambathursubramaniyam@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-11-30 15:16:36 +01:00
Saravanan
740980aaba python3-django: fix CVE-2024-39329
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-39329

Upstream-patch:
156d3186c9

Signed-off-by: Saravanan <saravanan.kadambathursubramaniyam@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-11-30 15:16:34 +01:00
Saravanan
21d389c8f9 python3-django: fix CVE-2025-57833
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-57833

Upstream-patch:
31334e6965

Signed-off-by: Saravanan <saravanan.kadambathursubramaniyam@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-11-30 15:16:32 +01:00
Saravanan
0b554678b6 python3-django: fix CVE-2024-56374
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-56374

Upstream-patch:
ad866a1ca3

Signed-off-by: Saravanan <saravanan.kadambathursubramaniyam@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-11-30 15:16:31 +01:00
Saravanan
540b79e3ee python3-django: fix CVE-2025-26699
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-26699

Upstream-patch:
e88f7376fe

Signed-off-by: Saravanan <saravanan.kadambathursubramaniyam@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-11-30 15:16:30 +01:00
Saravanan
666ec505b4 python3-django: fix CVE-2024-27351
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-27351

Upstream-patch:
072963e4c4

Signed-off-by: Saravanan <saravanan.kadambathursubramaniyam@windriver.com>
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
2025-11-30 15:16:29 +01:00
Soumya Sambu
954acdcf1b python3-django: Fix CVE-2024-53907
An issue was discovered in Django 5.1 before 5.1.4, 5.0 before 5.0.10, and 4.2
before 4.2.17. The strip_tags() method and striptags template filter are subject
to a potential denial-of-service attack via certain inputs containing large
sequences of nested incomplete HTML entities.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-53907

Upstream-patch:
790eb058b0

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:23:09 -05:00
Soumya Sambu
be168328f8 python3-django: Fix CVE-2024-45231
An issue was discovered in Django v5.1.1, v5.0.9, and v4.2.16. The
django.contrib.auth.forms.PasswordResetForm class, when used in a view
implementing password reset flows, allows remote attackers to enumerate
user e-mail addresses by sending password reset requests and observing
the outcome (only when e-mail sending is consistently failing).

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-45231

Upstream-patch:
bf4888d317

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:23:05 -05:00
Soumya Sambu
b4feba446d python3-django: Fix CVE-2024-45230
An issue was discovered in Django 5.1 before 5.1.1, 5.0 before 5.0.9, and
4.2 before 4.2.16. The urlize() and urlizetrunc() template filters are
subject to a potential denial-of-service attack via very large inputs with
a specific sequence of characters.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-45230

Upstream-patch:
d147a8ebbd

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:23:02 -05:00
Soumya Sambu
aa9e8a5557 python3-django: Fix CVE-2024-41991
An issue was discovered in Django 5.0 before 5.0.8 and 4.2 before 4.2.15. The
urlize and urlizetrunc template filters, and the AdminURLFieldWidget widget,
are subject to a potential denial-of-service attack via certain inputs with a
very large number of Unicode characters.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-41991

Upstream-patch:
efea1ef7e2

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:22:59 -05:00
Soumya Sambu
4e8fa78778 python3-django: Fix CVE-2024-41990
An issue was discovered in Django 5.0 before 5.0.8 and 4.2 before 4.2.15.
The urlize() and urlizetrunc() template filters are subject to a potential
denial-of-service attack via very large inputs with a specific sequence of
characters.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-41990

Upstream-patch:
d0a82e26a7

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:22:56 -05:00
Soumya Sambu
46701493ac python3-django: Fix CVE-2024-41989
An issue was discovered in Django 5.0 before 5.0.8 and 4.2 before 4.2.15. The
floatformat template filter is subject to significant memory consumption when
given a string representation of a number in scientific notation with a large
exponent.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-41989

Upstream-patches:
08c5a78726
4b066bde69
dcd9746983
fc76660f58

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:20:15 -05:00
Soumya Sambu
91d60c9b0a python3-django: Fix CVE-2024-39614
An issue was discovered in Django 5.0 before 5.0.7 and 4.2 before 4.2.14.
get_supported_language_variant() was subject to a potential denial-of-service
attack when used with very long strings containing specific characters.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-39614

Upstream-patch:
17358fb35f

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:20:12 -05:00
Soumya Sambu
e13c721bed python3-django: Fix CVE-2023-23969
In Django 3.2 before 3.2.17, 4.0 before 4.0.9, and 4.1 before 4.1.6, the parsed values
of Accept-Language headers are cached in order to avoid repetitive parsing. This leads
to a potential denial-of-service vector via excessive memory usage if the raw value of
Accept-Language headers is very large.

References:
https://nvd.nist.gov/vuln/detail/CVE-2023-23969

Upstream-patch:
c7e0151fdf

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:20:09 -05:00
Soumya Sambu
580693f8b9 python3-django: Fix CVE-2024-38875
An issue was discovered in Django 4.2 before 4.2.14 and 5.0 before 5.0.7.
urlize and urlizetrunc were subject to a potential denial of service attack
via certain inputs with a very large number of brackets.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-38875
https://github.com/advisories/GHSA-qg2p-9jwr-mmqf

Upstream-patch:
79f3687642

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2025-01-22 19:20:02 -05:00
Soumya Sambu
376f3a1aba python3-django: Fix CVE-2024-42005
An issue was discovered in Django 5.0 before 5.0.8 and 4.2 before 4.2.15.
QuerySet.values() and values_list() methods on models with a JSONField are
subject to SQL injection in column aliases via a crafted JSON object key
as a passed *arg.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-42005

Upstream-patch:
f4af67b9b4

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-08-25 18:12:26 -04:00
Rahul Janani Pandi
ac06a65404 python3-django: fix CVE-2024-24680
An issue was discovered in Django 3.2 before 3.2.24, 4.2 before 4.2.10,
and Django 5.0 before 5.0.2. The intcomma template filter was subject
to a potential denial-of-service attack when used with very long strings.

Since, there is no ptest available for python3-django so have not
tested the patch changes at runtime.

References:
https://security-tracker.debian.org/tracker/CVE-2024-24680
https://docs.djangoproject.com/en/dev/releases/4.2.10/

Signed-off-by: Rahul Janani Pandi <RahulJanani.Pandi@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-04-28 13:10:23 -04:00
Narpat Mali
fee5560548 python3-django: Fix for CVE-2023-43665 and CVE-2023-46695
CVE-2023-43665:
In Django 3.2 before 3.2.22, 4.1 before 4.1.12, and 4.2 before 4.2.6, the
django.utils.text.Truncator chars() and words() methods (when used with
html=True) are subject to a potential DoS (denial of service) attack via
certain inputs with very long, potentially malformed HTML text. The chars()
and words() methods are used to implement the truncatechars_html and
truncatewords_html template filters, which are thus also vulnerable.
NOTE: this issue exists because of an incomplete fix for CVE-2019-14232.

CVE-2023-46695:
An issue was discovered in Django 3.2 before 3.2.23, 4.1 before 4.1.13, and
4.2 before 4.2.7. The NFKC normalization is slow on Windows. As a consequence,
django.contrib.auth.forms.UsernameField is subject to a potential DoS (denial of
service) attack via certain inputs with a very large number of Unicode characters.

References:
https://www.djangoproject.com/weblog/2023/oct/04/security-releases/
https://www.djangoproject.com/weblog/2023/nov/01/security-releases/

Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2024-01-12 07:14:16 -05:00
Narpat Mali
ab9a31fabc python3-django: fix CVE-2023-41164
In Django 3.2 before 3.2.21, 4 before 4.1.11, and 4.2 before 4.2.5,
``django.utils.encoding.uri_to_iri()`` was subject to potential denial
of service attack via certain inputs with a very large number of Unicode
characters.

Since, there is no ptest available for python3-django so have not
tested the patch changes at runtime.

References:
https://security-tracker.debian.org/tracker/CVE-2023-41164
https://www.djangoproject.com/weblog/2023/sep/04/security-releases/

Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-09-27 10:23:14 -04:00
Narpat Mali
ac60beb44f python3-django: fix CVE-2023-36053
In Django 3.2 before 3.2.20, 4 before 4.1.10, and 4.2 before 4.2.3,
EmailValidator and URLValidator are subject to a potential ReDoS
(regular expression denial of service) attack via a very large
number of domain name labels of emails and URLs.

Since, there is no ptest available for python3-django so have not
tested the patch changes at runtime.

References:
https://github.com/advisories/GHSA-jh3w-4vvf-mjgr
454f2fb934

Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-08-25 10:45:34 -04:00
Narpat Mali
e43d068788 python3-django: fix for CVE-2023-31047
In Django 3.2 before 3.2.19, 4.x before 4.1.9, and 4.2 before 4.2.1,
it was possible to bypass validation when using one form field to
upload multiple files. This multiple upload has never been supported
by forms.FileField or forms.ImageField (only the last uploaded file was
validated). However, Django's "Uploading multiple files" documentation
suggested otherwise.

Since, there is no ptest available for python3-django so have not tested
the patch changes at runtime.

Signed-off-by: Narpat Mali <narpat.mali@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2023-06-17 13:49:44 -04:00