Ubuntu 16.04 ESM / 18.04 LTS / 20.04 LTS : Python vulnerabilities (USN-5342-1)

high Nessus Plugin ID 159255

Synopsis

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

Description

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

- A flaw was found in Python, specifically within the urllib.parse module. This module helps break Uniform Resource Locator (URL) strings into components. The issue involves how the urlparse method does not sanitize input and allows characters like '\r' and ' ' in the URL path. This flaw allows an attacker to input a crafted URL, leading to injection attacks. This flaw affects Python versions prior to 3.10.0b1, 3.9.5, 3.8.11, 3.7.11 and 3.6.14. (CVE-2022-0391)

- There's a flaw in Python 3's pydoc. A local or adjacent attacker who discovers or is able to convince another local or adjacent user to start a pydoc server could access the server and use it to disclose sensitive information belonging to the other user that they would not normally be able to access. The highest risk of this flaw is to data confidentiality. This flaw affects Python versions before 3.8.9, Python versions before 3.9.3 and Python versions before 3.10.0a7. (CVE-2021-3426)

- A flaw was found in Python, specifically in the FTP (File Transfer Protocol) client library in PASV (passive) mode. The issue is how the FTP client trusts the host from the PASV response by default. This flaw allows an attacker to set up a malicious FTP server that can trick FTP clients into connecting back to a given IP address and port. This vulnerability could lead to FTP client scanning ports, which otherwise would not have been possible. (CVE-2021-4189)

Note that Nessus has not tested for these issues 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-5342-1

Plugin Details

Severity: High

ID: 159255

File Name: ubuntu_USN-5342-1.nasl

Version: 1.6

Type: local

Agent: unix

Published: 3/28/2022

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: 4.4

CVSS v2

Risk Factor: Medium

Base Score: 5

Temporal Score: 4.1

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

CVSS Score Source: CVE-2022-0391

CVSS v3

Risk Factor: High

Base Score: 7.5

Temporal Score: 7

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

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

Vulnerability Information

CPE: cpe:/o:canonical:ubuntu_linux:16.04:-:esm, 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.4, p-cpe:/a:canonical:ubuntu_linux:idle-python3.5, p-cpe:/a:canonical:ubuntu_linux:idle-python3.6, 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.4, p-cpe:/a:canonical:ubuntu_linux:libpython3.4-dev, p-cpe:/a:canonical:ubuntu_linux:libpython3.4-minimal, p-cpe:/a:canonical:ubuntu_linux:libpython3.4-stdlib, p-cpe:/a:canonical:ubuntu_linux:libpython3.4-testsuite, p-cpe:/a:canonical:ubuntu_linux:libpython3.5, p-cpe:/a:canonical:ubuntu_linux:libpython3.5-dev, p-cpe:/a:canonical:ubuntu_linux:libpython3.5-minimal, p-cpe:/a:canonical:ubuntu_linux:libpython3.5-stdlib, p-cpe:/a:canonical:ubuntu_linux:libpython3.5-testsuite, p-cpe:/a:canonical:ubuntu_linux:libpython3.6, p-cpe:/a:canonical:ubuntu_linux:libpython3.6-dev, p-cpe:/a:canonical:ubuntu_linux:libpython3.6-minimal, p-cpe:/a:canonical:ubuntu_linux:libpython3.6-stdlib, p-cpe:/a:canonical:ubuntu_linux:libpython3.6-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.4, p-cpe:/a:canonical:ubuntu_linux:python3.4-dev, p-cpe:/a:canonical:ubuntu_linux:python3.4-examples, p-cpe:/a:canonical:ubuntu_linux:python3.4-minimal, p-cpe:/a:canonical:ubuntu_linux:python3.4-venv, p-cpe:/a:canonical:ubuntu_linux:python3.5, p-cpe:/a:canonical:ubuntu_linux:python3.5-dev, p-cpe:/a:canonical:ubuntu_linux:python3.5-examples, p-cpe:/a:canonical:ubuntu_linux:python3.5-minimal, p-cpe:/a:canonical:ubuntu_linux:python3.5-venv, p-cpe:/a:canonical:ubuntu_linux:python3.6, p-cpe:/a:canonical:ubuntu_linux:python3.6-dev, p-cpe:/a:canonical:ubuntu_linux:python3.6-examples, p-cpe:/a:canonical:ubuntu_linux:python3.6-minimal, p-cpe:/a:canonical:ubuntu_linux:python3.6-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-full, 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/28/2022

Vulnerability Publication Date: 4/7/2021

Reference Information

CVE: CVE-2021-3426, CVE-2021-4189, CVE-2022-0391

IAVA: 2021-A-0263-S

USN: 5342-1