CVE-2021-28153
glib: g_file_replace() with G_FILE_CREATE_REPLACE_DESTINATION creates empty target for dangling symlink
Overview
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.)
Source: OX vulnerability database
Severity
5.3 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Weakness: CWE-59
Affected packages · 2
Operating systems · 31 fixes
Oracle Linux 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | glib2 +5 | 2.56.4-156.el8 |
| 9 | mingw32-glib2 +3 | 2.70.1-2.el9 |
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | glib +3 | 2.68.0-1.ph4 |
Red Hat 3 releases · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | glib2 +5 | eol | — |
| 8 | glib2 +5 | 0:2.56.4-156.el8 | RHSA-2021:4385 |
| 9 | mingw32-glib2 +3 | 0:2.70.1-2.el9 | RHSA-2022:8418 |
SUSE Linux Enterprise 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | glib2-devel +14 | 2.48.2-12.28.1 | SUSE-SU-2022:1758-1 |
SUSE Linux Enterprise Micro 3 releases · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.0 | glib2-tools +4 | 2.62.6-150200.3.9.1 | SUSE-SU-2022:1455-1 |
| 5.1 | glib2-tools +4 | 2.62.6-150200.3.10.1 | SUSE-SU-2023:0174-1 |
| 5.2 | glib2-tools +4 | 2.62.6-150200.3.10.1 | SUSE-SU-2023:0174-1 |
alma 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | glib2-doc +1 | 2.56.4-156.el8 |
| 9 | mingw32-glib2 +3 | 2.70.1-2.el9 |
debian 6 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 10 | glib2-0 | 2.58.3-2+deb10u3 |
| 11 | glib2-0 | 2.66.7-2 |
| 12 | glib2-0 | 2.66.7-2 |
| 13 | glib2-0 | 2.66.7-2 |
| 14 | glib2-0 | 2.66.7-2 |
| 9 | glib2-0 | 2.50.3-2+deb9u3 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| glib2-0 | 2.66.7-2 |
openSUSE Leap Micro 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.2 | glib2-tools +4 | 2.62.6-150200.3.10.1 | SUSE-SU-2022:1455-2 |
rocky 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 8 | glib2 +3 | 2.56.4-156.el8 |
root.io debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-glib2-0 | 2.66.7-2 |
| 12 | rootio-glib2-0 | 2.66.7-2 |
| 13 | rootio-glib2-0 | 2.66.7-2 |
seal Red Hat 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | glib2 +1 | 2.56.1-7.el7+sp999 |
| 8 | glib2 +1 | 2.56.4-165.el8_10+sp999 |
| 9 | glib2 +1 | 2.68.4-14.el9_4.1+sp999 |
ubuntu 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 18.04 | glib2-0 | 2.56.4-0ubuntu0.18.04.8 |
| 18.04-ESM | glib2-0 | 2.56.4-0ubuntu0.18.04.8 |
| 20.04 | glib2-0 | 2.64.6-1~ubuntu20.04.3 |
| 20.04-ESM | glib2-0 | 2.64.6-1~ubuntu20.04.3 |
References
- access.redhat.com https://access.redhat.com/errata/RHSA-2021:4385
- access.redhat.com https://access.redhat.com/errata/RHSA-2022:8418
- access.redhat.com https://access.redhat.com/security/cve/CVE-2021-28153
- bugzilla.redhat.com https://bugzilla.redhat.com/1938291
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1938284
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1938291
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1948988
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=1971533
- cert-portal.siemens.com https://cert-portal.siemens.com/productcert/html/ssa-398330.html
- creativecommons.org https://creativecommons.org/licenses/by/4.0/
Show all 25 references
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-28153
- cve.mitre.org https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3800
- errata.almalinux.org https://errata.almalinux.org/9/ALSA-2022-8418.html
- errata.rockylinux.org https://errata.rockylinux.org/RLSA-2021:4385
- gitlab.gnome.org https://gitlab.gnome.org/GNOME/glib/-/issues/2325
- linux.oracle.com https://linux.oracle.com/cve/CVE-2021-28153.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2022-8418.html
- lists.debian.org https://lists.debian.org/debian-lts-announce/2022/06/msg00006.html
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6RXTD5HCP2K4AAUSWWZTBKQNHRCTAEOF/
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ICUTQPHZNZWX2DZR46QFLQZRHVMHIILJ/
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2021-28153
- security.gentoo.org https://security.gentoo.org/glsa/202107-13
- security.netapp.com https://security.netapp.com/advisory/ntap-20210416-0003/
- ubuntu.com https://ubuntu.com/security/notices/USN-4764-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2021-28153
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.