CVE-2026-58013: Glib: buffer over-read in glib/giochannel.c via "g_io_channel_read_line_backend"
A flaw was found in GLib. A buffer over-read can occur in giochannelreadlinebackend() in the giochannel.c file when a custom line terminator with a length greater than one is set, causing memcmp to read past the GString buffer. This vulnerability can cause a minor information disclosure of 7 bytes or a denial of service when the buffer over-read crosses a page boundary.
Other sources
A heap-buffer-overflow READ occurs in giochannelreadlinebackend() at giochannel.c:1831 when a custom line terminator of length > 1 is set via giochannelsetlineterm(). The memcmp call reads linetermlen bytes from nextchar, but the loop condition nextchar < lastchar only guarantees 1 byte is available. When nextchar is within linetermlen - 1 bytes of lastchar, memcmp reads past the GString buffer into ASan redzone / unallocated memory.
— Red Hat
Glib: buffer over-read in glib/giochannel.c via "giochannelreadlinebackend"
— 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 - Upgrade
Upgrade
alpine/glibto a version that resolves this vulnerability.Fixed in 2.86.4-r0 - Upgrade
Upgrade
debian/glib2.0to a version that resolves this vulnerability.Fixed in 2.84.4-3~deb13u4Fixed in 2.88.1-2 - Upgrade
Upgrade
debian/glib2.0to a version that resolves this vulnerability.Fixed in 2.84.4-3~deb13u4 - Upgrade
Upgrade
debian/glib2.0to a version that resolves this vulnerability.Fixed in 2.88.1-2 - Upgrade
Upgrade
ubuntu/glib2.0to a version that resolves this vulnerability.Fixed in 2.40.2-0ubuntu1.1+esm8 - Upgrade
Upgrade
ubuntu/glib2.0to a version that resolves this vulnerability.Fixed in 2.48.2-0ubuntu4.8+esm6 - Upgrade
Upgrade
ubuntu/glib2.0to a version that resolves this vulnerability.Fixed in 2.56.4-0ubuntu0.18.04.9+esm6 - Upgrade
Upgrade
ubuntu/glib2.0to a version that resolves this vulnerability.Fixed in 2.64.6-1~ubuntu20.04.9+esm2 - Upgrade
Upgrade
ubuntu/glib2.0to a version that resolves this vulnerability.Fixed in 2.72.4-0ubuntu2.10 - Upgrade
Upgrade
ubuntu/glib2.0to a version that resolves this vulnerability.Fixed in 2.80.0-6ubuntu3.9 - Upgrade
Upgrade
ubuntu/glib2.0to a version that resolves this vulnerability.Fixed in 2.88.0-1ubuntu0.1
Event History
Frequently Asked Questions
What is the severity of CVE-2026-58013?
The severity of CVE-2026-58013 is rated high with a score of 8.2.
How do I fix CVE-2026-58013?
To fix CVE-2026-58013, update GLib to the latest version provided by your operating system's package manager.
What software is affected by CVE-2026-58013?
CVE-2026-58013 affects Red Hat Enterprise Linux and the GLib library.
What type of vulnerability is CVE-2026-58013?
CVE-2026-58013 is a buffer over-read vulnerability.
What is the risk associated with CVE-2026-58013?
CVE-2026-58013 has a risk score of 54, indicating potential for minor information disclosure.