CVE Vulnerabilities

CVE-2022-26488

Untrusted Search Path

Published: Mar 10, 2022 | Modified: Nov 07, 2023
CVSS 3.x
7
HIGH
Source:
NVD
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
4.4 MEDIUM
AV:L/AC:M/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
Ubuntu

In Python before 3.10.3 on Windows, local users can gain privileges because the search path is inadequately secured. The installer may allow a local attacker to add user-writable directories to the system search path. To exploit, an administrator must have installed Python for all users and enabled PATH entries. A non-administrative user can trigger a repair that incorrectly adds user-writable paths into PATH, enabling search-path hijacking of other users and system services. This affects Python (CPython) through 3.7.12, 3.8.x through 3.8.12, 3.9.x through 3.9.10, and 3.10.x through 3.10.2.

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.7.12 (including)
Python Python 3.8.0 (including) 3.8.12 (including)
Python Python 3.9.0 (including) 3.9.10 (including)
Python Python 3.10.0 (including) 3.10.2 (including)
Python Python 3.11.0-alpha1 (including) 3.11.0-alpha1 (including)
Python Python 3.11.0-alpha2 (including) 3.11.0-alpha2 (including)
Python Python 3.11.0-alpha3 (including) 3.11.0-alpha3 (including)
Python Python 3.11.0-alpha4 (including) 3.11.0-alpha4 (including)
Python Python 3.11.0-alpha5 (including) 3.11.0-alpha5 (including)
Python Python 3.11.0-alpha6 (including) 3.11.0-alpha6 (including)

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