Miggo Logo

CVE-2019-16784: Local Privilege Escalation in PyInstaller

7

CVSS Score
3.1

Basic Information

EPSS Score
0.86524%
Published
1/16/2020
Updated
10/23/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
PyInstallerpip< 3.63.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from PyInstaller's use of _wmkdir() in Windows 'onefile' mode to create temporary extraction directories. The commit diff shows _wmkdir was replaced by pyi_win32_mkdir (which adds ACL restrictions) in two locations in pyi_utils.c. The original _wmkdir call didn't set directory permissions, leaving them world-writable when created by privileged users in system temp paths. This matches the CWE-250 (unnecessary privileges) description and the advisory's technical explanation.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t Lo**l Privil*** *s**l*tion in *ll Win*ows so*tw*r* *roz*n *y PyInst*ll*r in "on**il*" mo**. T** vuln*r**ility is pr*s*nt only on Win*ows *n* in t*is p*rti*ul*r **s*: I* * **so*tw*r* *roz*n *y PyInst*ll*r in "on**il*" mo**** is l*un**** *

Reasoning

T** vuln*r**ility st*ms *rom PyInst*ll*r's us* o* _wmk*ir() in Win*ows 'on**il*' mo** to *r**t* t*mpor*ry *xtr**tion *ir**tori*s. T** *ommit *i** s*ows _wmk*ir w*s r*pl**** *y pyi_win**_mk*ir (w*i** ***s **L r*stri*tions) in two lo**tions in pyi_util