Arbitrary Code Execution Vulnerability in PyInstaller Versions Prior to 6.0.0
CVE-2025-59042
7HIGH
What is CVE-2025-59042?
A vulnerability in PyInstaller allows an unprivileged attacker to execute arbitrary Python code if specific conditions are met, including using an affected version of PyInstaller and having control over the executable's directory. This requires the bytecode encryption feature to be disabled, and the attacker must create malicious files that exploit the bootstrap process. If the executable runs with elevated privileges, the attacker could gain elevated access, posing a significant security risk. Upgrading to PyInstaller 6.0.0 or later addresses this issue, while proper directory permissions can serve as a workaround if immediate upgrades are not possible.
Affected Version(s)
pyinstaller < 6.0.0