Lucene search

K
openvasCopyright (C) 2024 Greenbone AGOPENVAS:1361412562310170805
HistoryAug 28, 2024 - 12:00 a.m.

Python Infinite Loop Vulnerability (Aug 2024) - Linux

2024-08-2800:00:00
Copyright (C) 2024 Greenbone AG
plugins.openvas.org
5
python
infinite loop
vulnerability
linux
denial of service
cve-2024-8088
zip archive
greenbone ag

CVSS4

8.7

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/SC:N/VI:N/SI:N/VA:H/SA:N/S:N/AU:N/R:U/RE:L

AI Score

7.4

Confidence

High

EPSS

0.001

Percentile

17.8%

Python is prone to an infinite loop vulnerability leading to a
denial of service (DoS).

# SPDX-FileCopyrightText: 2024 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only

CPE = "cpe:/a:python:python";

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.170805");
  script_version("2024-08-29T05:05:49+0000");
  script_tag(name:"last_modification", value:"2024-08-29 05:05:49 +0000 (Thu, 29 Aug 2024)");
  script_tag(name:"creation_date", value:"2024-08-28 09:54:13 +0000 (Wed, 28 Aug 2024)");
  script_tag(name:"cvss_base", value:"7.8");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:C");

  script_cve_id("CVE-2024-8088");

  script_tag(name:"qod_type", value:"remote_banner_unreliable");

  script_tag(name:"solution_type", value:"NoneAvailable");

  script_name("Python Infinite Loop Vulnerability (Aug 2024) - Linux");

  script_category(ACT_GATHER_INFO);

  script_copyright("Copyright (C) 2024 Greenbone AG");
  script_family("Denial of Service");
  script_dependencies("gb_python_consolidation.nasl", "os_detection.nasl");
  script_mandatory_keys("python/detected", "Host/runs_unixoide");

  script_tag(name:"summary", value:"Python is prone to an infinite loop vulnerability leading to a
  denial of service (DoS).");

  script_tag(name:"vuldetect", value:"Checks if a vulnerable version is present on the target host.");

  script_tag(name:"insight", value:"When iterating over names of entries in a zip archive (for
  example, methods of 'zipfile.Path' like 'namelist()', 'iterdir()', etc) the process can be put
  into an infinite loop with a maliciously crafted zip archive. This defect applies when reading
  only metadata or extracting the contents of the zip archive.

  Note: this vulnerability only affects zipfile.Path, while the more common API zipfile.ZipFile
  class is unaffected.");

  # TODO: As of 2024-08-28 there is no release containing the fix but it was merged in several branches so recheck this when new releases are made.
  script_tag(name:"affected", value:"All released versions of Python.");

  script_tag(name:"solution", value:"No known solution is available as of 28th August, 2024.
  Information regarding this issue will be updated once solution details are available.");

  script_xref(name:"URL", value:"https://mail.python.org/archives/list/[email protected]/thread/GNFCKVI4TCATKQLALJ5SN4L4CSPSMILU/");
  script_xref(name:"URL", value:"https://github.com/python/cpython/issues/122905");
  script_xref(name:"URL", value:"https://github.com/python/cpython/pull/122906");

  exit(0);
}

include("host_details.inc");
include("version_func.inc");

if (isnull(port = get_app_port(cpe: CPE)))
  exit(0);

if (!infos = get_app_version_and_location(cpe: CPE, port: port, exit_no_version: TRUE,
                                          version_regex: "^[0-9]+\.[0-9]+\.[0-9]+"))
  exit(0);

version = infos["version"];
location = infos["location"];

report = report_fixed_ver(installed_version: version, fixed_version: "None", install_path: location);
security_message(port: port, data: report);
exit(0);

CVSS4

8.7

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/SC:N/VI:N/SI:N/VA:H/SA:N/S:N/AU:N/R:U/RE:L

AI Score

7.4

Confidence

High

EPSS

0.001

Percentile

17.8%