CVE-2026-58012 Glib: buffer over-read in g_regex_replace() via glib/gregex.c:string_append() and g_utf8_next_char()

Medium 6.5 Published Updated

A buffer over-read in GLib's regex replacement allows attackers to disclose minor memory contents or cause a denial of service when using raw byte mode.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-58012?

CVE-2026-58012 is a medium-severity vulnerability in Redhat Enterprise Linux, published on 30 Jun 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A flaw was found in GLib. A buffer over-read can occur in the g_regex_replace function when used with the `G_REGEX_RAW` compile flag and case-change replacement escapes because the string_append function processes matched substrings using UTF-8 functions that assume valid UTF-8 input, even when the string is treated as raw bytes. This vulnerability can cause a minor information disclosure of 1-5 bytes and a denial of service when the buffer over-read crosses a page boundary.

Weakness: CWE-126

Which versions are affected by CVE-2026-58012?

It affects 2 products.

Products include Gnome Glib, Redhat Enterprise Linux.

How do I fix CVE-2026-58012?

Apply the vendor's patch.

Is CVE-2026-58012 being exploited?

There is no known exploitation of CVE-2026-58012 in the wild and no public exploit code.

All Redhat Enterprise Linux vulnerabilities

Sources

Also known as AZL-91436, BELL-CVE-2026-58012, DEBIAN-CVE-2026-58012, ECHO-77f1-be49-886b, GHSA-vwg8-37h9-g38g, JLSEC-2026-1245 and 5 more.

Is CVE-2026-58012 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free