Debian DLA-3164-1 : python-django - LTS security update

critical Nessus Plugin ID 166698

Synopsis

The remote Debian host is missing one or more security-related updates.

Description

The remote Debian 10 host has packages installed that are affected by multiple vulnerabilities as referenced in the dla-3164 advisory.

- 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). FILE_UPLOAD_DIRECTORY_PERMISSIONS mode was not applied to intermediate-level directories created in the process of uploading files. It was also not applied to intermediate-level collected static directories when using the collectstatic management command. (CVE-2020-24583)

- 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. (CVE-2020-24584)

- The package python/cpython from 0 and before 3.6.13, from 3.7.0 and before 3.7.10, from 3.8.0 and before 3.8.8, from 3.9.0 and before 3.9.2 are vulnerable to Web Cache Poisoning via urllib.parse.parse_qsl and urllib.parse.parse_qs by using a vector called parameter cloaking. When the attacker can separate query parameters using a semicolon (;), they can cause a difference in the interpretation of the request between the proxy (running with default configuration) and the server. This can result in malicious requests being cached as completely safe ones, as the proxy would usually not see the semicolon as a separator, and therefore would not include it in a cache key of an unkeyed parameter. (CVE-2021-23336)

- 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. (CVE-2021-3281)

- An issue was discovered in Django 3.2 before 3.2.14 and 4.0 before 4.0.6. The Trunc() and Extract() database functions are subject to SQL injection if untrusted data is used as a kind/lookup_name value.
Applications that constrain the lookup name and kind choice to a known safe list are unaffected.
(CVE-2022-34265)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.

Solution

Upgrade the python-django packages.

For Debian 10 Buster, these problems have been fixed in version 1

See Also

https://www.debian.org/lts/security/2022/dla-3164

https://security-tracker.debian.org/tracker/CVE-2020-24583

https://security-tracker.debian.org/tracker/CVE-2020-24584

https://security-tracker.debian.org/tracker/CVE-2021-23336

https://security-tracker.debian.org/tracker/CVE-2021-3281

https://security-tracker.debian.org/tracker/CVE-2022-34265

https://packages.debian.org/source/buster/python-django

Plugin Details

Severity: Critical

ID: 166698

File Name: debian_DLA-3164.nasl

Version: 1.3

Type: local

Agent: unix

Published: 10/28/2022

Updated: 10/6/2023

Supported Sensors: Frictionless Assessment Agent, Nessus Agent, Agentless Assessment, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 5.9

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2022-34265

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 8.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:debian:debian_linux:python-django, p-cpe:/a:debian:debian_linux:python-django-common, p-cpe:/a:debian:debian_linux:python-django-doc, p-cpe:/a:debian:debian_linux:python3-django, cpe:/o:debian:debian_linux:10.0

Required KB Items: Host/local_checks_enabled, Host/Debian/release, Host/Debian/dpkg-l

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 10/28/2022

Vulnerability Publication Date: 9/1/2020

Reference Information

CVE: CVE-2020-24583, CVE-2020-24584, CVE-2021-23336, CVE-2021-3281, CVE-2022-34265