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.
Published: 2026-09-07
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

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 yet.

History

Mon, 07 Sep 2026 16:15:00 +0000

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'}


Subscriptions

Redhat Enterprise Linux Hummingbird Openshift
cve-icon MITRE

Status: PUBLISHED

Assigner: redhat

Published:

Updated: 2026-09-07T16:00:13.925Z

Reserved: 2026-09-07T14:38:45.692Z

Link: CVE-2026-86469

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-07T16:17:30.713

Modified: 2026-09-07T16:17:30.713

Link: CVE-2026-86469

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-07T18:45:17Z

Weaknesses
  • CWE-59

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