CVE-2023-49797

Published: Dic 09, 2023 Last Modified: Nov 21, 2024 EU-VD ID: EUVD-2023-0216 Aliases: GHSA-9w2p-rh8c-v9g5, PYSEC-2023-292
ExploitDB:
Other exploit source:
Google Dorks:
HIGH 8,8
Attack Vector: local
Attack Complexity: low
Privileges Required: low
User Interaction: none
Scope: changed
Confidentiality: high
Integrity: high
Availability: high

Description

AI Translation Available

PyInstaller bundles a Python application and all its dependencies into a single package. A PyInstaller built application, elevated as a privileged process, may be tricked by an unprivileged attacker into deleting files the unprivileged user does not otherwise have access to. A user is affected if **all** the following are satisfied: 1. The user runs an application containing either `matplotlib` or `win32com`. 2. The application is ran as administrator (or at least a user with higher privileges than the attacker). 3. The user's temporary directory is not locked to that specific user (most likely due to `TMP`/`TEMP` environment variables pointing to an unprotected, arbitrary, non default location). Either: A. The attacker is able to very carefully time the replacement of a temporary file with a symlink. This switch must occur exactly between `shutil.rmtree()`'s builtin symlink check and the deletion itself B: The application was built with Python 3.7.x or earlier which has no protection against Directory Junctions links. The vulnerability has been addressed in PR #7827 which corresponds to `pyinstaller >= 5.13.1`. Users are advised to upgrade. There are no known workarounds for this vulnerability.

EPSS (Exploit Prediction Scoring System)

Trend Analysis

EPSS (Exploit Prediction Scoring System)

Prevede la probabilità di sfruttamento basata su intelligence sulle minacce e sulle caratteristiche della vulnerabilità.

EPSS Score
0,0005
Percentile
0,1th
Updated

EPSS Score Trend (Last 90 Days)

379

Creation of Temporary File in Directory with Insecure Permissions

Incomplete
Common Consequences
Security Scopes Affected:
Confidentiality
Potential Impacts:
Read Application Data
Applicable Platforms
All platforms may be affected
View CWE Details
732

Incorrect Permission Assignment for Critical Resource

Draft
Common Consequences
Security Scopes Affected:
Confidentiality Access Control Integrity Other
Potential Impacts:
Read Application Data Read Files Or Directories Gain Privileges Or Assume Identity Modify Application Data Other
Applicable Platforms
Technologies: Cloud Computing, Not Technology-Specific
View CWE Details
Application

Pyinstaller by Pyinstaller

Version Range Affected
To 5.13.1 (exclusive)
cpe:2.3:a:pyinstaller:pyinstaller:*:*:*:*:*:*:*:*
Common Platform Enumeration - Standardized vulnerability identification
https://github.com/pyinstaller/pyinstaller/pull/7827
https://github.com/pyinstaller/pyinstaller/security/advisories/GHSA-9w2p-rh8c-v…
https://github.com/python/cpython/blob/0fb18b02c8ad56299d6a2910be0bab8ad601ef24…
https://github.com/pyinstaller/pyinstaller/pull/7827
https://github.com/pyinstaller/pyinstaller/security/advisories/GHSA-9w2p-rh8c-v…
https://github.com/python/cpython/blob/0fb18b02c8ad56299d6a2910be0bab8ad601ef24…