CVE-2026-58012: Buffer Over-read in GNOME GLib
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.
AI Analysis
Technical Summary
CVE-2026-58012 is a buffer over-read vulnerability in GLib's g_regex_replace function when invoked with the G_REGEX_RAW compile flag combined with case-change replacement escapes (\u, \l, \U, \L). The vulnerability occurs because the string_append function uses UTF-8 processing functions that assume valid UTF-8 input, even though the string is treated as raw bytes. This can cause reading beyond the intended buffer by 1-5 bytes, potentially disclosing minor information and causing denial of service if the read crosses a page boundary. The vulnerability affects applications that allow user-controlled replacement strings with these case-change escapes under the G_REGEX_RAW flag. Red Hat's advisory confirms the issue, rates it as moderate severity, and provides mitigation guidance. A fix is available via updated packages in Red Hat Enterprise Linux 8 and related products.
Potential Impact
The vulnerability can lead to minor information disclosure of 1-5 bytes from memory due to buffer over-read, potentially leaking sensitive data such as memory addresses that could aid in bypassing protection mechanisms like ASLR. Additionally, it can cause a denial of service by crashing the application if the over-read crosses an unmapped memory page boundary. The impact on confidentiality is low, integrity is unaffected, and availability impact is low due to possible application crashes. There are no known exploits in the wild at this time.
Mitigation Recommendations
Red Hat advises implementing strict input validation to sanitize or reject user-supplied replacement strings containing case-change modifiers (\u, \l, \U, \L) before calling g_regex_replace() or g_regex_replace_eval() with the G_REGEX_RAW compile flag. Completely neutralizing the issue can be achieved by removing the G_REGEX_RAW flag or hardcoding replacement strings. Red Hat has released security updates for affected packages in Red Hat Enterprise Linux 8 and related products. Applying these official patches is the recommended remediation. Patch status is confirmed available via Red Hat advisories.
CVE-2026-58012: Buffer Over-read in GNOME GLib
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.
CVSS v3.1
Score 6.5medium
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-58012 is a buffer over-read vulnerability in GLib's g_regex_replace function when invoked with the G_REGEX_RAW compile flag combined with case-change replacement escapes (\u, \l, \U, \L). The vulnerability occurs because the string_append function uses UTF-8 processing functions that assume valid UTF-8 input, even though the string is treated as raw bytes. This can cause reading beyond the intended buffer by 1-5 bytes, potentially disclosing minor information and causing denial of service if the read crosses a page boundary. The vulnerability affects applications that allow user-controlled replacement strings with these case-change escapes under the G_REGEX_RAW flag. Red Hat's advisory confirms the issue, rates it as moderate severity, and provides mitigation guidance. A fix is available via updated packages in Red Hat Enterprise Linux 8 and related products.
Potential Impact
The vulnerability can lead to minor information disclosure of 1-5 bytes from memory due to buffer over-read, potentially leaking sensitive data such as memory addresses that could aid in bypassing protection mechanisms like ASLR. Additionally, it can cause a denial of service by crashing the application if the over-read crosses an unmapped memory page boundary. The impact on confidentiality is low, integrity is unaffected, and availability impact is low due to possible application crashes. There are no known exploits in the wild at this time.
Mitigation Recommendations
Red Hat advises implementing strict input validation to sanitize or reject user-supplied replacement strings containing case-change modifiers (\u, \l, \U, \L) before calling g_regex_replace() or g_regex_replace_eval() with the G_REGEX_RAW compile flag. Completely neutralizing the issue can be achieved by removing the G_REGEX_RAW flag or hardcoding replacement strings. Red Hat has released security updates for affected packages in Red Hat Enterprise Linux 8 and related products. Applying these official patches is the recommended remediation. Patch status is confirmed available via Red Hat advisories.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- redhat
- Date Reserved
- 2026-06-26T20:59:47.855Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-58012","vendor":"Red Hat"}]
Threat ID: 6a43c34927e9c79719d5bd5b
Added to database: 06/30/2026, 13:23:21 UTC
Last enriched: 08/03/2026, 19:48:01 UTC
Last updated: 08/14/2026, 00:41:13 UTC
Views: 96
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.