CVE-2026-86469
glib2: TOCTOU Symlink Race in `G_FILE_CREATE_REPLACE_DESTINATION` Fallback Path
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · September 7, 2026
Updated · November 2, 2026
Description
A flaw was found in GLib2. When g_file_replace() is used with G_FILE_CREATE_REPLACE_DESTINATION and creating the .goutputstream-XXXXXX temporary file fails, the library unlinks the destination and recreates it without exclusive creation or symlink protection. A local attacker who can write to the destination directory can win that race and redirect the write to another file.
Statement
Exploitation is local, requires write access to the destination directory, requires the uncommon temp-file fallback in handle_overwrite_open(), and requires winning a race. The usual g_file_replace() path writes to a temp file first and is not this bug. A successful race can overwrite or create a file the victim process is allowed to write.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Do not use g_file_replace(..., G_FILE_CREATE_REPLACE_DESTINATION) on paths in directories writable by less-privileged users.
CVSS / CWE
CVSS 3.1 · 5.3CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:L
CWE-59 · Improper Link Resolution Before File Access