CVE-2025-6052
glib: Integer overflow in g_string_maybe_expand() leading to potential buffer overflow in GLib GString
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · June 13, 2025
Updated · June 30, 2026
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.
Statement
The Red Hat Product Security team has assessed the severity of this vulnerability as Low, based on the high complexity required to trigger it and the limited impact. Exploitation requires unusually large string allocations, which are typically restricted in real-world deployments. However, under specific conditions where untrusted input is appended to a GString without size checks, a remote attacker could cause a crash or memory corruption, resulting in a denial of service (DoS) for the affected application.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Currently, no mitigation is available for this vulnerability.
CVSS / CWE
CVSS 3.1 · 3.7CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
CWE-190 · Integer Overflow or Wraparound