Amazon Linux 2 : python (ALAS-2022-1802)

critical Nessus Plugin ID 161936

Synopsis

The remote Amazon Linux 2 host is missing a security update.

Description

The version of python installed on the remote host is prior to 2.7.18-1. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2-2022-1802 advisory.

- 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)

- 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)

- There's a flaw in urllib's AbstractBasicAuthHandler class. An attacker who controls a malicious HTTP server that an HTTP client (such as web browser) connects to, could trigger a Regular Expression Denial of Service (ReDOS) during an authentication request with a specially crafted payload that is sent by the server to the client. The greatest threat that this flaw poses is to application availability.
(CVE-2021-3733)

- A flaw was found in python. An improperly handled HTTP response in the HTTP client code of python may allow a remote attacker, who controls the HTTP server, to make the client script enter an infinite loop, consuming CPU time. The highest threat from this vulnerability is to system availability. (CVE-2021-3737)

- 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)

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

Solution

Run 'yum update python' to update your system.

See Also

https://alas.aws.amazon.com/AL2/ALAS-2022-1802.html

https://alas.aws.amazon.com/cve/html/CVE-2020-27619.html

https://alas.aws.amazon.com/cve/html/CVE-2021-23336.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3733.html

https://alas.aws.amazon.com/cve/html/CVE-2021-3737.html

https://alas.aws.amazon.com/cve/html/CVE-2021-4189.html

https://alas.aws.amazon.com/cve/html/CVE-2022-0391.html

Plugin Details

Severity: Critical

ID: 161936

File Name: al2_ALAS-2022-1802.nasl

Version: 1.4

Type: local

Agent: unix

Published: 6/7/2022

Updated: 10/25/2023

Supported Sensors: Agentless Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Nessus Agent, 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-2020-27619

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:amazon:linux:python, p-cpe:/a:amazon:linux:python-debug, p-cpe:/a:amazon:linux:python-debuginfo, p-cpe:/a:amazon:linux:python-devel, p-cpe:/a:amazon:linux:python-libs, p-cpe:/a:amazon:linux:python-test, p-cpe:/a:amazon:linux:python-tools, p-cpe:/a:amazon:linux:tkinter, cpe:/o:amazon:linux:2

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 5/31/2022

Vulnerability Publication Date: 10/22/2020

Reference Information

CVE: CVE-2020-27619, CVE-2021-23336, CVE-2021-3733, CVE-2021-3737, CVE-2021-4189, CVE-2022-0391

IAVA: 2021-A-0052-S, 2021-A-0263-S, 2021-A-0497-S