REDHAT-BUG-2492247: Medium severity Gnome GLib vulnerability
A heap-buffer-overflow READ vulnerability exists in GLib's gregexreplace() function when used with GREGEXRAW compile flag and case-change replacement escapes (\U, \L, \u, \l). In GREGEXRAW mode, PCRE2 treats the subject string as raw bytes rather than UTF-8. Matched substrings can therefore contain arbitrary byte sequences that are not valid UTF-8. When the replacement string contains case-change escapes (e.g., \U\0 to uppercase the match), the internal stringappend() function processes the matched substring using UTF-8 functions (gutf8getchar(), gutf8nextchar()) which assume valid UTF-8 input. A multi-byte UTF-8 lead byte (e.g., 0xF4 indicating a 4-byte sequence) in the matched data causes these functions to read beyond the heap-allocated buffer.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2492247?
The severity of REDHAT-BUG-2492247 is categorized as medium, with a risk level of 4.
How do I fix REDHAT-BUG-2492247?
To fix REDHAT-BUG-2492247, update to the latest version of GNOME GLib that addresses this vulnerability.
What is the impact of REDHAT-BUG-2492247?
The impact of REDHAT-BUG-2492247 includes potential heap-buffer-overflow READ issues, which could lead to undefined behavior or memory corruption.
In which function does REDHAT-BUG-2492247 occur?
REDHAT-BUG-2492247 occurs in the g_regex_replace() function of GLib.
When was REDHAT-BUG-2492247 published?
REDHAT-BUG-2492247 was published on June 24, 2026.