CVEfocus › CVE database › CVE-2026-58012

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

CVSS 6.5 MediumEPSS 0.6% (higher than 45% of CVEs)Published 2026-06-30Updated 2026-11-24Assigner: redhat

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.

CWE-126

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

64Fixed
5Fix pending
10Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04glib2.0Fixed2.88.0-1ubuntu0.1UBUNTU-CVE-2026-58012
Ubuntu 25.10glib2.0Will not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-58012
Ubuntu 24.04glib2.0Fixed2.80.0-6ubuntu3.9UBUNTU-CVE-2026-58012
Ubuntu 22.04glib2.0Fixed2.72.4-0ubuntu2.10UBUNTU-CVE-2026-58012
Ubuntu 20.04glib2.0Fix pending2.64.6-1~ubuntu20.04.9+esm2 (Ubuntu Pro)UBUNTU-CVE-2026-58012
Ubuntu 18.04glib2.0Fix pending2.56.4-0ubuntu0.18.04.9+esm6 (Ubuntu Pro)UBUNTU-CVE-2026-58012
Ubuntu 16.04glib2.0Fix pending2.48.2-0ubuntu4.8+esm6 (Ubuntu Pro)UBUNTU-CVE-2026-58012
Ubuntu 14.04glib2.0Fix pending2.40.2-0ubuntu1.1+esm8 (Ubuntu Pro)UBUNTU-CVE-2026-58012
Debian 14glib2.0Fixed2.88.1-2DEBIAN-CVE-2026-58012
Debian 13glib2.0Fixed2.84.4-3~deb13u4DEBIAN-CVE-2026-58012
Debian 12glib2.0Fix pendingDEBIAN-CVE-2026-58012
Red Hat Enterprise Linux 10glib2Fixed0:2.80.4-12.el10_2.21RHSA-2026:57015
Red Hat Enterprise Linux 10glib2-develFixed0:2.80.4-12.el10_2.21RHSA-2026:57015
Red Hat Enterprise Linux 10glib2-docFixed0:2.80.4-12.el10_2.21RHSA-2026:57015
Red Hat Enterprise Linux 10glib2-staticFixed0:2.80.4-12.el10_2.21RHSA-2026:57015
Red Hat Enterprise Linux 10glib2-testsFixed0:2.80.4-12.el10_2.21RHSA-2026:57015
Red Hat Enterprise Linux 10mingw-glib2Fixed0:2.89.2-1.el10RHSA-2026:97163
Red Hat Enterprise Linux 10mingw32-glib2Fixed0:2.89.2-1.el10RHSA-2026:97163
Red Hat Enterprise Linux 10mingw32-glib2-staticFixed0:2.89.2-1.el10RHSA-2026:97163
Red Hat Enterprise Linux 10mingw64-glib2Fixed0:2.89.2-1.el10RHSA-2026:97163
Red Hat Enterprise Linux 10mingw64-glib2-staticFixed0:2.89.2-1.el10RHSA-2026:97163
Red Hat Enterprise Linux 9glib2Fixed0:2.68.4-19.el9_8.9RHSA-2026:55440
Red Hat Enterprise Linux 9glib2-develFixed0:2.68.4-19.el9_8.9RHSA-2026:55440
Red Hat Enterprise Linux 9glib2-docFixed0:2.68.4-19.el9_8.9RHSA-2026:55440
Red Hat Enterprise Linux 9glib2-staticFixed0:2.68.4-19.el9_8.9RHSA-2026:55440
Red Hat Enterprise Linux 9glib2-testsFixed0:2.68.4-19.el9_8.9RHSA-2026:55440
Red Hat Enterprise Linux 9mingw-glib2Will not fix
Will not fix
Red Hat Enterprise Linux 9mingw32-glib2Will not fix
Will not fix
Red Hat Enterprise Linux 9mingw32-glib2-staticWill not fix
Will not fix
Red Hat Enterprise Linux 9mingw64-glib2Will not fix
Will not fix
Red Hat Enterprise Linux 9mingw64-glib2-staticWill not fix
Will not fix
Red Hat Enterprise Linux 8glib2Fixed0:2.56.4-177.el8_10RHSA-2026:61766
Red Hat Enterprise Linux 8glib2-develFixed0:2.56.4-177.el8_10RHSA-2026:61766
Red Hat Enterprise Linux 8glib2-docFixed0:2.56.4-177.el8_10RHSA-2026:61766
Red Hat Enterprise Linux 8glib2-famFixed0:2.56.4-177.el8_10RHSA-2026:61766
Red Hat Enterprise Linux 8glib2-staticFixed0:2.56.4-177.el8_10RHSA-2026:61766
Red Hat Enterprise Linux 8glib2-testsFixed0:2.56.4-177.el8_10RHSA-2026:61766
Red Hat Enterprise Linux 8mingw-glib2Fixed0:2.70.1-9.el8_10RHSA-2026:49512
Red Hat Enterprise Linux 8mingw32-glib2Fixed0:2.70.1-9.el8_10RHSA-2026:49512
Red Hat Enterprise Linux 8mingw32-glib2-staticFixed0:2.70.1-9.el8_10RHSA-2026:49512
Red Hat Enterprise Linux 8mingw64-glib2Fixed0:2.70.1-9.el8_10RHSA-2026:49512
Red Hat Enterprise Linux 8mingw64-glib2-staticFixed0:2.70.1-9.el8_10RHSA-2026:49512
Red Hat Enterprise Linux 6glib2Will not fix
Will not fix
Red Hat Enterprise Linux 6glib2-develWill not fix
Will not fix
Red Hat Enterprise Linux 6glib2-docWill not fix
Will not fix
Red Hat Enterprise Linux 6glib2-staticWill not fix
Will not fix
AlmaLinux 10glib2Fixed2.80.4-12.el10_2.21ALSA-2026:57015
AlmaLinux 10glib2-develFixed2.80.4-12.el10_2.21ALSA-2026:57015
AlmaLinux 10glib2-docFixed2.80.4-12.el10_2.21ALSA-2026:57015
AlmaLinux 10glib2-staticFixed2.80.4-12.el10_2.21ALSA-2026:57015
AlmaLinux 10glib2-testsFixed2.80.4-12.el10_2.21ALSA-2026:57015
AlmaLinux 10mingw32-glib2Fixed2.89.2-1.el10ALSA-2026:97163
AlmaLinux 10mingw32-glib2-staticFixed2.89.2-1.el10ALSA-2026:97163
AlmaLinux 10mingw64-glib2Fixed2.89.2-1.el10ALSA-2026:97163
AlmaLinux 10mingw64-glib2-staticFixed2.89.2-1.el10ALSA-2026:97163
AlmaLinux 9glib2Fixed2.68.4-19.el9_8.9ALSA-2026:55440
AlmaLinux 9glib2-develFixed2.68.4-19.el9_8.9ALSA-2026:55440
AlmaLinux 9glib2-docFixed2.68.4-19.el9_8.9ALSA-2026:55440
AlmaLinux 9glib2-staticFixed2.68.4-19.el9_8.9ALSA-2026:55440
AlmaLinux 9glib2-testsFixed2.68.4-19.el9_8.9ALSA-2026:55440
AlmaLinux 8glib2Fixed2.56.4-177.el8_10ALSA-2026:61766
AlmaLinux 8glib2-develFixed2.56.4-177.el8_10ALSA-2026:61766
AlmaLinux 8glib2-docFixed2.56.4-177.el8_10ALSA-2026:61766
AlmaLinux 8glib2-famFixed2.56.4-177.el8_10ALSA-2026:61766
AlmaLinux 8glib2-staticFixed2.56.4-177.el8_10ALSA-2026:61766
AlmaLinux 8glib2-testsFixed2.56.4-177.el8_10ALSA-2026:61766
AlmaLinux 8mingw32-glib2Fixed2.70.1-9.el8_10ALSA-2026:49512
AlmaLinux 8mingw32-glib2-staticFixed2.70.1-9.el8_10ALSA-2026:49512
AlmaLinux 8mingw64-glib2Fixed2.70.1-9.el8_10ALSA-2026:49512
AlmaLinux 8mingw64-glib2-staticFixed2.70.1-9.el8_10ALSA-2026:49512
Rocky Linux 10glib2Fixed0:2.80.4-12.el10_2.21RLSA-2026:57015
Rocky Linux 10mingw32-glib2Fixed0:2.89.2-1.el10RLSA-2026:97163
Rocky Linux 10mingw32-glib2-staticFixed0:2.89.2-1.el10RLSA-2026:97163
Rocky Linux 10mingw64-glib2Fixed0:2.89.2-1.el10RLSA-2026:97163
Rocky Linux 10mingw64-glib2-staticFixed0:2.89.2-1.el10RLSA-2026:97163
Rocky Linux 9glib2Fixed0:2.68.4-19.el9_8.9RLSA-2026:55440
Rocky Linux 8glib2Fixed0:2.56.4-177.el8_10RLSA-2026:61766
Rocky Linux 8mingw-glib2Fixed0:2.70.1-9.el8_10RLSA-2026:49512
Alpine Linux 3.23glibFixed2.86.4-r0ALPINE-CVE-2026-58012

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: To mitigate this vulnerability, implement strict input validation to sanitize user-supplied replacement strings, specifically rejecting or escaping case-change modifiers (\u, \l, \U, \L) before calling g_regex_replace() or g_regex_replace_eval() when the G_REGEX_RAW compile flag is used. Removing the G_REGEX_RAW flag or hardcoding the replacement strings will completely neutralize this issue.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.