Arbitrary Code Execution Vulnerability in PyInstaller Versions Prior to 6.0.0
CVE-2025-59042

7HIGH

Key Information:

Vendor
CVE Published:
9 September 2025

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

References

CVSS V4

Score:
7
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
Unknown

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.
CVE-2025-59042 : Arbitrary Code Execution Vulnerability in PyInstaller Versions Prior to 6.0.0