CVE-2021-28153

glib: g_file_replace() with G_FILE_CREATE_REPLACE_DESTINATION creates empty target for dangling symlink

Published Mar 11, 2021 CVSS 3.1 · 5.3 Medium EPSS 2.7% KEV · Not listed
Description
An issue was discovered in GNOME GLib before 2.66.8. When g_file_replace() is used with G_FILE_CREATE_REPLACE_DESTINATION to replace a path that is a dangling symlink, it incorrectly also creates the target of the symlink as an empty file, which could conceivably have security relevance if the symlink is attacker-controlled. (If the path is a symlink to a file that already exists, then the contents of that file correctly remain unchanged.)

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-3044-1 glib2.0 security update
EUVD EUVD EUVD-2021-14851 An issue was discovered in GNOME GLib before 2.66.8. When g_file_replace() is used with G_FILE_CREATE_REPLACE_DESTINATION to replace a path that is a dangling symlink, it incorrectly also creates the target of the symlink as an empty file, which could conceivably have security relevance if the symlink is attacker-controlled. (If the path is a symlink to a file that already exists, then the contents of that file correctly remain unchanged.)
Ubuntu USN Ubuntu USN USN-4764-1 GLib vulnerability
Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Oct 14, 2026, 11:39 AM
Reserved
Mar 11, 2021, 12:00 AM
Status
Modified
Published
Mar 11, 2021, 10:15 PM
Modified
Oct 14, 2026, 12:17 PM
Severity
Low
Public date
Mar 10, 2021, 12:00 AM