An exploitable local privilege elevation vulnerability exists in the file system permissions of GOG Galaxy’s
Temp directory. An attacker can overwrite executables of the Desktop Galaxy Updater to exploit this vulnerability and execute arbitrary code with SYSTEM privileges.
Gog Galaxy 184.108.40.206 (Windows 64-bit Installer)
9.3 - CVSS:3.0/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
CWE-276: Incorrect Default Permissions
GOG Galaxy is a platform that allows users to launch, update and manage video games. By default, GOG Galaxy extracts the executables for the automatic update function in a directory that allows anyone on the system to have “full control.” This allows all users to read, write or modify arbitrary files related to the GOG Galaxy Updater Service. The executables include sensitive data, such as a root CA, as well as executables that will be run with SYSTEM privileges once they are installed, allowing an attacker to overwrite them prior to installation to achieve arbitrary code execution with SYSTEM privileges.
``` C:>icacls.exe “C:\ProgramData\GOG.com\Galaxy\temp\desktop-galaxy-updater” C:\ProgramData\GOG.com\Galaxy\temp\desktop-galaxy-updater Everyone:(I)(F) Everyone:(I)(OI)(CI)(IO)(F) NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F) BUILTIN\Administrators:(I)(OI)(CI)(F) SPRITE\rjohnson:(I)(F) CREATOR OWNER:(I)(OI)(CI)(IO)(F) BUILTIN\Users:(I)(OI)(CI)(RX) BUILTIN\Users:(I)(CI)(WD,AD,WEA,WA)
Successfully processed 1 files; Failed processing 0 files
C:>dir “C:\ProgramData\GOG.com\Galaxy\temp\desktop-galaxy-updater” Volume in drive C has no label. Volume Serial Number is DEC6-C1D3
Directory of C:\ProgramData\GOG.com\Galaxy\temp\desktop-galaxy-updater
11/09/2018 03:10 PM
Users of GOG Galaxy can replace the “Full Control” permission with “Read and Execute” for the “Everyone” group in the GOG Galaxy “Temp” directory and ensure all file system objects below that path inherit from the parent directory.
2018-11-20 - Vendor Disclosure
2019-03-14 - Vendor Patched
2019-03-26 - Public Release
Discovered by Richard Johnson of Cisco Talos.