Untrusted search path in pyinstaller - CVE-2025-59042

 

Untrusted search path in pyinstaller - CVE-2025-59042

Published: September 9, 2025


Vulnerability identifier: #VU115104
CSH Severity: Low
CVSS v4.0: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Clear
CVE-ID: CVE-2025-59042
CWE-ID: CWE-426
Exploitation vector: Local access
Exploit availability: No public exploit available
Vendor: PyInstaller
Affected software:
pyinstaller

Detailed vulnerability description

The vulnerability allows a local user to escalate privileges on the system.

The vulnerability exists due to a special entry being appended to sys.path during the bootstrap process of a PyInstaller-frozen application, and due to the bootstrap script attempting to load an optional module for bytecode decryption while this entry is still present in sys.path. A local user can trick the installer under certain circumstances into executing a malicious code and escalate privileges on the system.


How to mitigate CVE-2025-59042

Install updates from vendor's website.

Sources