CVE-2026-58014: Glib: off-by-one error in glib/gkeyfile.c via "g_key_file_get_locale_string_list"
A flaw was found in GLib. An off-by-one error can occur in the gkeyfilegetlocalestringlist function in the gkeyfile.c file when loading a key file with an empty value. This flaw can cause an out-of-bounds access of 1 byte or a denial of service when the out-of-bounds access crosses a page boundary.
Other sources
A heap-buffer-overflow READ of 1 byte occurs in gkeyfilegetlocalestringlist() at gkeyfile.c:2464 when the resolved locale string value is an empty string (""). The function computes len = strlen(value) which yields 0, then accesses value[len - 1]. Since len is gsize(unsigned), len - 1 wraps to SIZEMAX, causing a read of 1 byte before the heap allocation (under-read). Any application that loads a key file from untrusted input and calls gkeyfilegetlocalestringlist() on a key whose value is empty is affected. The key file format is commonly used for .desktop files and application configuration.
— Red Hat
Glib: off-by-one error in glib/gkeyfile.c via "gkeyfilegetlocalestringlist"
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.78.6-10
Event History
Frequently Asked Questions
What is the severity of CVE-2026-58014?
The severity of CVE-2026-58014 is high, with a score of 8.6.
How do I fix CVE-2026-58014?
To fix CVE-2026-58014, update GLib to the latest patched version as provided by your software vendor.
What impact does CVE-2026-58014 have?
CVE-2026-58014 can lead to out-of-bounds access or denial of service due to an off-by-one error.
Which software is affected by CVE-2026-58014?
CVE-2026-58014 affects Red Hat Enterprise Linux and GLib, specifically in the gkeyfile.c file.
What is the cause of CVE-2026-58014?
CVE-2026-58014 is caused by an off-by-one error in the g_key_file_get_locale_string_list function when handling empty values.