CVE Vulnerabilities

CVE-2023-41105

Untrusted Search Path

Published: Aug 23, 2023 | Modified: Nov 07, 2023
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CVSS 2.x
RedHat/V2
RedHat/V3
7.5 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Ubuntu
MEDIUM

An issue was discovered in Python 3.11 through 3.11.4. If a path containing 0 bytes is passed to os.path.normpath(), the path will be truncated unexpectedly at the first 0 byte. There are plausible cases in which an application would have rejected a filename for security reasons in Python 3.10.x or earlier, but that filename is no longer rejected in Python 3.11.x.

Weakness

The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product’s direct control.

Affected Software

Name Vendor Start Version End Version
Python Python 3.11.0 (including) 3.11.4 (including)
Red Hat Enterprise Linux 8 RedHat python3.11-0:3.11.5-1.el8_9 *
Red Hat Enterprise Linux 9 RedHat python3.11-0:3.11.5-1.el9_3 *
Python Ubuntu bionic *
Python Ubuntu trusty *
Python Ubuntu xenial *
Python2.7 Ubuntu bionic *
Python2.7 Ubuntu trusty *
Python2.7 Ubuntu xenial *
Python3.11 Ubuntu jammy *
Python3.11 Ubuntu lunar *
Python3.11 Ubuntu upstream *
Python3.4 Ubuntu trusty *
Python3.5 Ubuntu trusty *
Python3.5 Ubuntu xenial *
Python3.6 Ubuntu bionic *
Python3.7 Ubuntu bionic *
Python3.8 Ubuntu bionic *

Extended Description

This might allow attackers to execute their own programs, access unauthorized data files, or modify configuration in unexpected ways. If the product uses a search path to locate critical resources such as programs, then an attacker could modify that search path to point to a malicious program, which the targeted product would then execute. The problem extends to any type of critical resource that the product trusts. Some of the most common variants of untrusted search path are:

Potential Mitigations

References