Ubuntu 18.04 LTS / 20.04 LTS : Python vulnerabilities (USN-4754-3)

critical Nessus Plugin ID 148008

Synopsis

The remote Ubuntu host is missing one or more security updates.

Description

The remote Ubuntu 18.04 LTS / 20.04 LTS host has packages installed that are affected by multiple vulnerabilities as referenced in the USN-4754-3 advisory.

- Lib/zipfile.py in Python through 3.7.2 allows remote attackers to cause a denial of service (resource consumption) via a ZIP bomb. (CVE-2019-9674)

- library/glob.html in the Python 2 and 3 documentation before 2016 has potentially misleading information about whether sorting occurs, as demonstrated by irreproducible cancer-research results. NOTE: the effects of this documentation cross application domains, and thus it is likely that security-relevant code elsewhere is affected. This issue is not a Python implementation bug, and there are no reports that NMR researchers were specifically relying on library/glob.html. In other words, because the older documentation stated finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, one might have incorrectly inferred that the sorting that occurs in a Unix shell also occurred for glob.glob. There is a workaround in newer versions of Willoughby nmr-data_compilation-p2.py and nmr-data_compilation-p3.py, which call sort() directly. (CVE-2019-17514)

- In Lib/tarfile.py in Python through 3.8.3, an attacker is able to craft a TAR archive leading to an infinite loop when opened by tarfile.open, because _proc_pax lacks header validation. (CVE-2019-20907)

- Python 2.7 through 2.7.17, 3.5 through 3.5.9, 3.6 through 3.6.10, 3.7 through 3.7.6, and 3.8 through 3.8.1 allows an HTTP server to conduct Regular Expression Denial of Service (ReDoS) attacks against a client because of urllib.request.AbstractBasicAuthHandler catastrophic backtracking. (CVE-2020-8492)

- http.client in Python 3.x before 3.5.10, 3.6.x before 3.6.12, 3.7.x before 3.7.9, and 3.8.x before 3.8.5 allows CRLF injection if the attacker controls the HTTP request method, as demonstrated by inserting CR and LF control characters in the first argument of HTTPConnection.request. (CVE-2020-26116)

- In Python 3 through 3.9.0, the Lib/test/multibytecodec_support.py CJK codec tests call eval() on content retrieved via HTTP. (CVE-2020-27619)

- Python 3.x through 3.9.1 has a buffer overflow in PyCArg_repr in _ctypes/callproc.c, which may lead to remote code execution in certain Python applications that accept floating-point numbers as untrusted input, as demonstrated by a 1e300 argument to c_double.from_param. This occurs because sprintf is used unsafely. (CVE-2021-3177)

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

Solution

Update the affected packages.

See Also

https://ubuntu.com/security/notices/USN-4754-3

Plugin Details

Severity: Critical

ID: 148008

File Name: ubuntu_USN-4754-3.nasl

Version: 1.4

Type: local

Agent: unix

Published: 3/23/2021

Updated: 10/16/2023

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: High

Base Score: 7.5

Temporal Score: 6.2

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

CVSS Score Source: CVE-2021-3177

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Temporal Score: 9.1

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:F/RL:O/RC:C

Vulnerability Information

CPE: cpe:/o:canonical:ubuntu_linux:18.04:-:lts, cpe:/o:canonical:ubuntu_linux:20.04:-:lts, p-cpe:/a:canonical:ubuntu_linux:idle-python2.7, p-cpe:/a:canonical:ubuntu_linux:idle-python3.7, p-cpe:/a:canonical:ubuntu_linux:idle-python3.8, p-cpe:/a:canonical:ubuntu_linux:libpython2.7, p-cpe:/a:canonical:ubuntu_linux:libpython2.7-dev, p-cpe:/a:canonical:ubuntu_linux:libpython2.7-minimal, p-cpe:/a:canonical:ubuntu_linux:libpython2.7-stdlib, p-cpe:/a:canonical:ubuntu_linux:libpython2.7-testsuite, p-cpe:/a:canonical:ubuntu_linux:libpython3.7, p-cpe:/a:canonical:ubuntu_linux:libpython3.7-dev, p-cpe:/a:canonical:ubuntu_linux:libpython3.7-minimal, p-cpe:/a:canonical:ubuntu_linux:libpython3.7-stdlib, p-cpe:/a:canonical:ubuntu_linux:libpython3.7-testsuite, p-cpe:/a:canonical:ubuntu_linux:libpython3.8, p-cpe:/a:canonical:ubuntu_linux:libpython3.8-dev, p-cpe:/a:canonical:ubuntu_linux:libpython3.8-minimal, p-cpe:/a:canonical:ubuntu_linux:libpython3.8-stdlib, p-cpe:/a:canonical:ubuntu_linux:libpython3.8-testsuite, p-cpe:/a:canonical:ubuntu_linux:python2.7, p-cpe:/a:canonical:ubuntu_linux:python2.7-dev, p-cpe:/a:canonical:ubuntu_linux:python2.7-examples, p-cpe:/a:canonical:ubuntu_linux:python2.7-minimal, p-cpe:/a:canonical:ubuntu_linux:python3.7, p-cpe:/a:canonical:ubuntu_linux:python3.7-dev, p-cpe:/a:canonical:ubuntu_linux:python3.7-examples, p-cpe:/a:canonical:ubuntu_linux:python3.7-minimal, p-cpe:/a:canonical:ubuntu_linux:python3.7-venv, p-cpe:/a:canonical:ubuntu_linux:python3.8, p-cpe:/a:canonical:ubuntu_linux:python3.8-dev, p-cpe:/a:canonical:ubuntu_linux:python3.8-examples, p-cpe:/a:canonical:ubuntu_linux:python3.8-minimal, p-cpe:/a:canonical:ubuntu_linux:python3.8-venv

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

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 3/12/2021

Vulnerability Publication Date: 10/12/2019

Reference Information

CVE: CVE-2019-17514, CVE-2019-20907, CVE-2019-9674, CVE-2020-26116, CVE-2020-27619, CVE-2020-8492, CVE-2021-3177

USN: 4754-3