GOG Galaxy Games directory insecure file permissions local privilege elevation vulnerability
The GOG Galaxy 'Games' directory was created with permissions granting the Everyone group full control, so any local user could overwrite files inside it. An attacker could replace a game executable or a privileged installer component to run arbitrary code with elevated privileges.
Originally disclosed on Cisco Talos
An exploitable local privilege elevation vulnerability exists in the file system permissions of GOG Galaxy’s “Games” directory. An attacker can overwrite executables of installed games to exploit this vulnerability and execute arbitrary code with elevated privileges.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the installer created the Games directory with an explicit full-control access control entry for the Everyone group instead of restricting write access to administrators.
Impact
A local user could overwrite game executables and, where a privileged installer component runs, could gain administrative access or take over other user accounts.
What the attacker needed
Local access to the machine; a low-privileged user account; a privileged installer or another user runs the file
The fix
The vendor patched it; users could also replace the Everyone group's full control with read and execute and ensure child objects inherit from the parent directory.
How it was found
- Check the permissions on the GOG Galaxy Games directory and see that Everyone has full control.
- Check a game subdirectory and confirm the same full-control permission is inherited.
- Overwrite an executable in that directory with attacker-controlled code.
- Wait for a privileged installer component or another user to run the replaced executable, gaining elevated code execution.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
On Windows, every file and folder has permissions saying who may read or change it. GOG Galaxy created its Games folder so that every user on the computer could change anything inside it. A low-privileged user could therefore swap a game program for their own, and if that program later ran with higher rights, so did their code.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.