CVEBrief

Home / pyinstaller / pyinstaller / CVE-2023-49797

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

CVE-2023-49797 is a creation of Temporary File in Directory with Insecure Permissions 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, 12:38 UTC). Affected: pyinstaller before 5.13.1 (GitHub advisory GHSA-9w2p-rh8c-v9g5). Fixed in 5.13.1 (GitHub advisory GHSA-9w2p-rh8c-v9g5). Severity: High (8.8, CVSS 3.1, from GitHub_M).

Data checked December 3, 2026: last read CISA KEV December 3, 2026, 12:38 UTC, CVE record November 19, 2026, 07:12 UTC and NVD November 19, 2026, 07:33 UTC.

Exploited in the wild
Not in CISA KEV
KEV read December 3, 2026, 12:38 UTC
Affected
pyinstaller before 5.13.1
GitHub advisory GHSA-9w2p-rh8c-v9g5
Fixed in
5.13.1
GitHub advisory GHSA-9w2p-rh8c-v9g5
Severity
High 8.8
CVSS 3.1 from GitHub_M
Exploit odds (EPSS)
0.32% in 30 days
higher than 27% of CVEs; FIRST, December 2, 2026

What is CVE-2023-49797?

Local Privilege Escalation in pyinstaller on Windows

PyInstaller bundles a Python application and all its dependencies into a single package. A PyInstaller built application, elevated as a privileged process, may be tricked by an unprivileged attacker into deleting files the unprivileged user does not otherwise have access to. A user is affected if **all** the following are satisfied: 1. The user runs an application containing either `matplotlib` or `win32com`. 2. The application is ran as administrator (or at least a user with higher privileges than the attacker). 3. The user's temporary directory is not locked to that specific user (most likely due to `TMP`/`TEMP` environment variables pointing to an unprotected, arbitrary, non default location). Either: A. The attacker is able to very carefully time the replacement of a temporary file with a symlink. This switch must occur exactly between `shutil.rmtree()`'s builtin symlink check and the deletion itself B: The application was built with Python 3.7.x or earlier which has no protection against Directory Junctions links. The vulnerability has been addressed in PR #7827 which corresponds to `pyinstaller >= 5.13.1`. Users are advised to upgrade. There are no known workarounds for this vulnerability.

From the CVE record by GitHub_M, last updated February 13, 2025, 17:18 UTC.

Which versions are affected, and which fix it?

VendorProductAffectedFixed or not affected from
pyinstallerpyinstaller< 5.13.1

As the CVE record by GitHub_M states it, last updated February 13, 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< 5.13.15.13.1GHSA-9w2p-rh8c-v9g5

GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 22, 2024. Summary: Local Privilege Escalation in Windows.

Which products and versions does the NVD list as affected?

VendorProductVersionsType
pyinstallerpyinstallerbefore 5.13.1application

NVD analysis (status Modified), last modified June 17, 2026, 06:36 UTC.

How severe is CVE-2023-49797?

ScoreVersionVectorSource
High 8.8CVSS 3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HGitHub_M
High 7.8CVSS 3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HNVD

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-2023-49797 exploited in the wild?

CISA KEV
Not listed (catalog 2026.11.30)
EPSS
0.32% probability of exploitation activity in the next 30 days, percentile 27.5 (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
November 30, 2023
Published
December 9, 2023, 00:42 UTC
CVE record updated
February 13, 2025, 17:18 UTC by GitHub_M
NVD
Modified, last modified June 17, 2026, 06:36 UTC
Last checked
CVE list November 19, 2026, 07:12 UTC; NVD November 19, 2026, 07:33 UTC; KEV December 3, 2026, 12:38 UTC; EPSS December 2, 2026
Official record
cve.org · NVD

What other CVEs affect pyinstaller?

Every CVE in pyinstaller

Questions about CVE-2023-49797

Is CVE-2023-49797 exploited in the wild?

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

Which versions of pyinstaller are affected by CVE-2023-49797?

pyinstaller before 5.13.1, per the GitHub advisory GHSA-9w2p-rh8c-v9g5. The tables above give every range the sources list.

Which version fixes CVE-2023-49797?

5.13.1, per the GitHub advisory GHSA-9w2p-rh8c-v9g5. Check the vendor's advisory before you rely on it.

How severe is CVE-2023-49797?

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

Where is the official record of CVE-2023-49797?

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.