CVEBrief

Home / pyinstaller / pyinstaller / CVE-2025-59042

CVE-2025-59042: is it exploited, and which versions of pyinstaller are affected and fixed?

CVE-2025-59042 is a code injection (remote code execution) vulnerability in pyinstaller. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 13:08 UTC). Affected: pyinstaller before 6.0.0 (GitHub advisory GHSA-p2xp-xx3r-mffc). Fixed in 6.0.0 (GitHub advisory GHSA-p2xp-xx3r-mffc). Severity: High (7.0, CVSS 4.0, from GitHub_M).

Data checked December 3, 2026: last read CISA KEV December 3, 2026, 13:08 UTC, CVE record November 19, 2026, 07:09 UTC and NVD November 19, 2026, 07:17 UTC.

Exploited in the wild
Not in CISA KEV
KEV read December 3, 2026, 13:08 UTC
Affected
pyinstaller before 6.0.0
GitHub advisory GHSA-p2xp-xx3r-mffc
Fixed in
6.0.0
GitHub advisory GHSA-p2xp-xx3r-mffc
Severity
High 7.0
CVSS 4.0 from GitHub_M
Exploit odds (EPSS)
0.14% in 30 days
higher than 3% of CVEs; FIRST, December 2, 2026
Free for up to 3 items: a weekly email, and an alert the day CISA lists one as exploited. We email you once to confirm. More about the watch

What is CVE-2025-59042?

PyInstaller has local privilege escalation vulnerability

PyInstaller bundles a Python application and all its dependencies into a single package. 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`, 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 `setuid` 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 encryption; this effectively removes the described attack vector, due to the bootstrap script not attempting to load the optional module for bytecode-decryption anymore. PyInstaller 6.10.0 (cfd60b510f95f92cb81fc42735c399bb781a4739) reworked the bootstrap process to avoid (ab)using `sys.path` for transmitting location of the PYZ archive, which further eliminates the possibility of described injection procedure. If upgrading PyInstaller is not feasible, this issue can be worked around by ensuring proper permissions on directories containing security-sensitive executables (i.e., executables with `setuid` bit set) should mitigate the issue.

From the CVE record by GitHub_M, last updated September 10, 2025, 17:24 UTC.

Which versions are affected, and which fix it?

VendorProductAffectedFixed or not affected from
pyinstallerpyinstaller< 6.0.0

As the CVE record by GitHub_M states it, last updated September 10, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.

Which packages are affected, and in which version is each fixed?

EcosystemPackageAffectedFixed inAdvisory
PyPIpyinstaller< 6.0.06.0.0GHSA-p2xp-xx3r-mffc

GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated September 10, 2025. Summary: PyInstaller has local privilege escalation vulnerability.

How severe is CVE-2025-59042?

ScoreVersionVectorSource
High 7.0CVSS 4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NGitHub_M

Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.

What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.

Is CVE-2025-59042 exploited in the wild?

CISA KEV
Not listed (catalog 2026.11.30)
CISA SSVC
Exploitation: none; automatable: no; technical impact: total (CISA ADP, September 10, 2025)
EPSS
0.14% probability of exploitation activity in the next 30 days, percentile 3.2 (FIRST EPSS, scores of December 2, 2026)

What kind of flaw is it?

Where are the vendor advisories and references?

When was it published, and where is the official record?

Reserved
September 8, 2025
Published
September 9, 2025, 22:28 UTC
CVE record updated
September 10, 2025, 17:24 UTC by GitHub_M
NVD
Deferred, last modified October 23, 2026, 22:10 UTC
Last checked
CVE list November 19, 2026, 07:09 UTC; NVD November 19, 2026, 07:17 UTC; KEV December 3, 2026, 13:08 UTC; EPSS December 2, 2026
Official record
cve.org · NVD

What other CVEs affect pyinstaller?

Every CVE in pyinstaller

Questions about CVE-2025-59042

Is CVE-2025-59042 exploited in the wild?

Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 13:08 UTC. FIRST's EPSS gives it a 0.14% chance of exploitation activity in the next 30 days (scores of December 2, 2026).

Which versions of pyinstaller are affected by CVE-2025-59042?

pyinstaller before 6.0.0, per the GitHub advisory GHSA-p2xp-xx3r-mffc. The tables above give every range the sources list.

Which version fixes CVE-2025-59042?

6.0.0, per the GitHub advisory GHSA-p2xp-xx3r-mffc. Check the vendor's advisory before you rely on it.

How severe is CVE-2025-59042?

High (7.0, CVSS 4.0, from GitHub_M). The severity table above shows each score with its source.

Where is the official record of CVE-2025-59042?

The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.