Vulnerability · CVE-2025-59042
PyInstaller bundles a Python application and all its dependencies into a single package.
Published Sep 9, 2025 · catalog updated Oct 19, 2026 · PyInstaller bundles a Python
Open the advisory
Exploitation likelihood is not on this record for CVE-2025-59042. A missing EPSS score is not a low risk. Compare PyInstaller bundles a Python with the linked advisory before you change production.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (PyInstaller bundles a Python).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- EPSS is missing. A missing score is not a low risk.
- Severity
- High7.0
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- Awaiting synchronization with FIRST
- Remediation
- Version ranges on file
- Affected products
- stated named in the record
PyInstaller bundles a Python application and all its dependencies into a single package. Due to a special entry being appended to 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 , an application built with PyInstaller < 6.0.0 may be tricked by an unprivileged attacker into executing arbitrary python code when **all** of the following conditions are met. First, the application is built with PyInstaller < 6.0.0; both onedir and onefile mode are affected. Second, the optional bytecode encryption code feature was not enabled during the application build. Third, the attacker can create files/directories in the same directory where the executable is located. Fourth, the filesystem supports creation of files/directories that contain in their name (i.e., non-Windows systems). Fifth, the attacker is able to determine the offset at which the PYZ archive is embedded in the executable. The attacker can create a directory (or a zip archive) next to the executable, with the name that matches the format used by PyInstaller's bootloader to transmit information about the location of PYZ archive to the bootstrap script. If this directory (or zip archive) contains a python module whose name matches the name used by the optional bytecode encryption feature, this module will be loaded and executed by the bootstrap script (in the absence of the real, built-in module that is available when the bytecode-encryption feature is enabled). This results in arbitrary code execution that requires no modification of the executable itself. If the executable is running with elevated privileges (for example, due to having the bit set), the code in the injected module is also executed with the said elevated privileges, resulting in a local privilege escalation. PyInstaller 6.0.0 (f5adf291c8b832d5aff7632844f7e3ddf7ad4923) removed support for bytecode encryp
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- stated named in the record< 6.0.0
How to fix CVE-2025-59042
Recommended remediation
Affected version ranges suggest a fixed boundary. Verify against the vendor advisory for your release.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
Exploitation likelihood is not on this record for CVE-2025-59042. A missing EPSS score is not a low risk. Compare PyInstaller bundles a Python with the linked advisory before you change production.
Which versions are affected?
Compare what you have installed with named in the record < 6.0.0. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
CWE-94: Code Injection. EPSS is not on this record yet. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Code
The project this record applies to. Exploit listings stay in References.
Timeline
Detection, updates, and resolution for this record.
Sep 9, 2025 · NIST NVD
Detected
PyInstaller bundles a Python application and all its dependencies into a single package. Due to a special entry being appended to 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 , an application built with PyInstaller < 6.0.0 may be tricked by an unpr
Oct 19, 2026 · NIST NVD
Updated
PyInstaller bundles a Python application and all its dependencies into a single package. Due to a special entry being appended to 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 , an application built with PyInstaller < 6.0.0 may be tricked by an unpr
Sources
- NIST NVDVulnerability recordCVE-2025-59042
PyInstaller bundles a Python application and all its dependencies into a single package. Due to a special entry being appended to during the bootstrap process of a PyInstaller-frozen application, and due to the bootstrap script attempting to load an optional module for
nvd.nist.gov
References
Freshness
Last verified in this catalog Oct 19, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.