Debian DLA-3575-1 : python2.7 - LTS security update

critical Nessus Plugin ID 181697

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-3575 advisory.

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

- 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 '\n' 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)

- A use-after-free exists in Python through 3.9 via heappushpop in heapq. (CVE-2022-48560)

- An XML External Entity (XXE) issue was discovered in Python through 3.9.1. The plistlib module no longer accepts entity declarations in XML plist files to avoid XML vulnerabilities. (CVE-2022-48565)

- An issue was discovered in compare_digest in Lib/hmac.py in Python through 3.9.1. Constant-time-defeating optimisations were possible in the accumulator variable in hmac.compare_digest. (CVE-2022-48566)

- An issue in the urllib.parse component of Python before 3.11.4 allows attackers to bypass blocklisting methods by supplying a URL that starts with blank characters. (CVE-2023-24329)

- An issue was discovered in Python before 3.8.18, 3.9.x before 3.9.18, 3.10.x before 3.10.13, and 3.11.x before 3.11.5. It primarily affects servers (such as HTTP servers) that use TLS client authentication. If a TLS server-side socket is created, receives data into the socket buffer, and then is closed quickly, there is a brief window where the SSLSocket instance will detect the socket as not connected and won't initiate a handshake, but buffered data will still be readable from the socket buffer. This data will not be authenticated if the server-side TLS peer is expecting client certificate authentication, and is indistinguishable from valid TLS stream data. Data is limited in size to the amount that will fit in the buffer. (The TLS connection cannot directly be used for data exfiltration because the vulnerable code path requires that the connection be closed on initialization of the SSLSocket.) (CVE-2023-40217)

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 python2.7 packages.

For Debian 10 buster, these problems have been fixed in version 2.7.16-2+deb10u3.

See Also

https://www.debian.org/lts/security/2023/dla-3575

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

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

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

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

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

https://security-tracker.debian.org/tracker/CVE-2023-24329

https://security-tracker.debian.org/tracker/CVE-2023-40217

https://packages.debian.org/source/buster/python2.7

https://security-tracker.debian.org/tracker/source-package/python2.7

Plugin Details

Severity: Critical

ID: 181697

File Name: debian_DLA-3575.nasl

Version: 1.0

Type: local

Agent: unix

Published: 9/20/2023

Updated: 9/20/2023

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

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Medium

Base Score: 5

Temporal Score: 3.9

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

CVSS Score Source: CVE-2022-0391

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

CVSS Score Source: CVE-2022-48565

Vulnerability Information

CPE: p-cpe:/a:debian:debian_linux:idle-python2.7, p-cpe:/a:debian:debian_linux:libpython2.7, p-cpe:/a:debian:debian_linux:libpython2.7-dbg, p-cpe:/a:debian:debian_linux:libpython2.7-dev, p-cpe:/a:debian:debian_linux:libpython2.7-minimal, p-cpe:/a:debian:debian_linux:libpython2.7-stdlib, p-cpe:/a:debian:debian_linux:libpython2.7-testsuite, p-cpe:/a:debian:debian_linux:python2.7, p-cpe:/a:debian:debian_linux:python2.7-dbg, p-cpe:/a:debian:debian_linux:python2.7-dev, p-cpe:/a:debian:debian_linux:python2.7-doc, p-cpe:/a:debian:debian_linux:python2.7-examples, p-cpe:/a:debian:debian_linux:python2.7-minimal, 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: 9/20/2023

Vulnerability Publication Date: 2/15/2021

Reference Information

CVE: CVE-2021-23336, CVE-2022-0391, CVE-2022-48560, CVE-2022-48565, CVE-2022-48566, CVE-2023-24329, CVE-2023-40217