CVE-2026-86469

Glib2: toctou symlink race in `g_file_create_replace_destination` fallback path

Published Sep 7, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A flaw in GLib2’s g_file_replace function creates a race condition when the G_FILE_CREATE_REPLACE_DESTINATION flag is used and the temporary file creation fails. The function removes the target file and recreates it without enforcing exclusive creation or protecting against symlinks. A local attacker who can write to the target directory can exploit the TOCTOU window, unlink the intended file, and replace it with a symbolic link pointing to another file, thereby redirecting subsequent writes to an arbitrary path.

Affected Systems

The vulnerability is present in Red Hat’s bundled GLib2 across multiple distributions: Red Hat Enterprise Linux 6 through 10, Red Hat OpenShift Container Platform 4, and Red Hat Hardened Images. Any system that runs GLib2 and calls g_file_replace with G_FILE_CREATE_REPLACE_DESTINATION in directories writable by less‑privileged users is affected until the vendor releases a patch.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate severity. EPSS data is not available, and the flaw has not been listed in the CISA KEV catalog, suggesting limited public exploitation. However, the attack only requires local write access on the target directory, which is common, so the risk to environments where processes run as non‑root but can write to shared directories is non‑negligible.

Remediation

Vendor Workaround

Do not use g_file_replace(..., G_FILE_CREATE_REPLACE_DESTINATION) on paths in directories writable by less-privileged users.


OpenCVE Recommended Actions

  • Apply the vendor‑supplied GLib2 patch that fixes the race condition.
  • Avoid calling g_file_replace with G_FILE_CREATE_REPLACE_DESTINATION on directories writable by less‑privileged users, following the vendor’s workaround.
  • Restrict write permissions on vulnerable directories to remove write access for non‑privileged users.

Generated by OpenCVE AI on September 7, 2026 at 18:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:/a:redhat:enterprise_linux:10
cpe:/a:redhat:enterprise_linux:8
cpe:/a:redhat:enterprise_linux:9
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Type Values Removed Values Added
First Time appeared Redhat openshift Ai
CPEs cpe:/a:redhat:openshift_ai
Vendors & Products Redhat openshift Ai
Type Values Removed Values Added
First Time appeared Redhat rhel Els
CPEs cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
cpe:/a:redhat:enterprise_linux:10
cpe:/a:redhat:enterprise_linux:8
cpe:/a:redhat:enterprise_linux:9
cpe:/o:redhat:rhel_els:6
cpe:/o:redhat:rhel_els:7
Vendors & Products Redhat rhel Els
Type Values Removed Values Added
CPEs cpe:/a:redhat:openshift:5
Type Values Removed Values Added
First Time appeared Redhat hardened Images
Redhat openshift Container Platform
Vendors & Products Redhat hardened Images
Redhat openshift Container Platform
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Glib2: toctou symlink race in `g_file_create_replace_destination` fallback path
First Time appeared Redhat
Redhat enterprise Linux
Redhat hummingbird
Redhat openshift
Weaknesses CWE-59
CPEs cpe:/a:redhat:hummingbird:1
cpe:/a:redhat:openshift:4
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:6
cpe:/o:redhat:enterprise_linux:7
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux
Redhat hummingbird
Redhat openshift
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:L'}

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Nov 24, 2026, 10:10 PM
Reserved
Sep 7, 2026, 2:38 PM
Status
Awaiting Analysis
Published
Sep 7, 2026, 4:17 PM
Modified
Nov 24, 2026, 10:18 PM
Severity
Moderate
Public date
Sep 7, 2026, 2:47 PM