Skip to content
OpenAdvisories
Low · 3.7 CVE-2025-6052 EUVD-2025-18285GHSA-99rj-3595-5frj

Glib: integer overflow in g_string_maybe_expand() leading to potential buffer overflow in glib gstring

Published Jun 13, 2025 · Updated Jun 2, 2026 · Assigned by redhat

Description

A flaw was found in how GLib’s GString manages memory when adding data to strings. If a string is already very large, combining it with more input can cause a hidden overflow in the size calculation. This makes the system think it has enough memory when it doesn’t. As a result, data may be written past the end of the allocated memory, leading to crashes or memory corruption.

Affected products

VendorProductAffectedFixed
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 — —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 glib2.0 2.84.3-1 —
Debian 13 glib2.0 2.84.3-1 —
ReleasePackageFixed inAdvisory
Ubuntu 25.10 glib2.0 2.86.0-2ubuntu0.1 USN-7942-1
Ubuntu 24.04 LTS glib2.0 2.80.0-6ubuntu3.6 USN-7942-1
Ubuntu 22.04 LTS glib2.0 2.72.4-0ubuntu2.7 USN-7942-1
ReleasePackageFixed inAdvisory
SLES 15 SP7 glib2 2.78.6-150600.4.16.1 SUSE-SU-2025:02167-1
SLES 15 SP6 glib2 2.78.6-150600.4.16.1 SUSE-SU-2025:02167-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLE Micro 6.1 glib2 2.78.6-slfo.1.1_4.1 SUSE-SU-2025:20673-1
SLE Micro 6.0 glib2 2.76.2-9.1 SUSE-SU-2025:20508-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed glib2 2.84.3-1.1 openSUSE-SU-2025:15221-1
openSUSE Leap 15.6 glib2 +1 2.78.6-150600.4.16.1 SUSE-SU-2025:02167-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 glib2 +4 2.82.2-766.amzn2023 ALAS2023-2025-1069

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 glib 2.78.6-3 —

Advisories 13

References