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: 7.3 [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]
CVE-ID: CVE-2025-59042
CWE-ID: CWE-426
Exploitation vector: Local access
Exploit availability: No public exploit available

Vulnerability details

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.


Affected software

pyinstaller
openEuler
python-pyinstaller
python-pyinstaller-debuginfo
python-pyinstaller-debugsource
python-pyinstaller-help
python3-pyinstaller

How to mitigate CVE-2025-59042

Install updates from vendor's website.

pyinstaller - update to 6.0.0
python-pyinstaller - update to 5.13.0-3
python-pyinstaller-debuginfo - update to 5.13.0-3
python-pyinstaller-debugsource - update to 5.13.0-3
python-pyinstaller-help - update to 5.13.0-3
python3-pyinstaller - update to 5.13.0-3

External References

Related Security Bulletins