CVE-2026-58012

MEDIUM

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

Title source: cna
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2026-58012. PoCs published by HermesNA-1.

AI-analyzed exploit summary This repository contains an auto-generated stub module for CVE-2026-58012, a buffer over-read vulnerability in GLib's `g_regex_replace` function when used with `G_REGEX_RAW` and case-change replacement escapes. The code includes placeholder logic for target probing but lacks actual exploit implementation.

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.

Exploits (1)

github STUB 1 stars
by HermesNA-1 · pythonpoc
https://github.com/HermesNA-1/SnakeSploit/tree/main/data/modules_generated/cve-2026-58012_flaw_was_found.py

This repository contains an auto-generated stub module for CVE-2026-58012, a buffer over-read vulnerability in GLib's `g_regex_replace` function when used with `G_REGEX_RAW` and case-change replacement escapes. The code includes placeholder logic for target probing but lacks actual exploit implementation.

Classification
Stub 99%
Attack Type
Info Leak
Complexity
Moderate
Reliability
Theoretical
Target: GLib (unspecified version, likely affected versions prior to patch)
No auth needed
Prerequisites: Target must expose a network service using GLib's regex functionality with `G_REGEX_RAW` and case-change replacement escapes · Attacker must craft a malicious regex pattern and replacement string to trigger the buffer over-read
mistral-large-3 · analyzed Jul 09, 2026 Full analysis →

References (3)

Core 3
Core References
Vdb Entry, X_Refsource_Redhat vdb-entry x_refsource_redhat
https://access.redhat.com/security/cve/CVE-2026-58012
Issue Tracking, X_Refsource_Redhat issue-tracking x_refsource_redhat
RHBZ#2492247
https://bugzilla.redhat.com/show_bug.cgi?id=2492247

Scores

CVSS v3 6.5
EPSS 0.0032
EPSS Percentile 24.2%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L

CISA SSVC

Vulnrichment
Exploitation none
Automatable yes
Technical Impact partial

Details

CWE
CWE-126
Status published
Products (15)
gnome/glib 2.88.0
GNOME/GLib < 2.86.5
gnome/glib < 2.86.5
GNOME/GLib < 2.88.1
Red Hat/Red Hat Enterprise Linux 10
Red Hat/Red Hat Enterprise Linux 6
Red Hat/Red Hat Enterprise Linux 7
Red Hat/Red Hat Enterprise Linux 8
Red Hat/Red Hat Enterprise Linux 9
Red Hat/Red Hat Hardened Images
... and 5 more
Published Jun 30, 2026
Tracked Since Jun 30, 2026