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