CVE-2025-6052: Glib: integer overflow in g_string_maybe_expand() leading to potential buffer overflow in glib gstring

Published Jun 13, 2025
·
Updated

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.

Other sources

An integer overflow vulnerability exists in the gstringmaybeexpand() function of the GLib library. When extremely large strings are used and more data is appended, an internal size calculation can wrap around, making the system incorrectly assume that there’s enough space in the buffer. This leads to a buffer overflow, causing memory corruption or a crash. Although difficult to exploit in practice due to the extremely large memory conditions required, this issue could be triggered remotely if an application accepts large untrusted input and uses GString for string operations.

Red Hat

Affected Software

2 affected components
Gnome GLib
Gnome GLib>=2.75.3<=2.84.3

Event History

Jun 13, 2025
Data Sourced
via Red Hat·12:10 PM
DescriptionSeverityAffected Software
CVE Published
via MITRE·03:40 PM
Data Sourced
via MITRE·03:40 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-6052?

CVE-2025-6052 has been classified with a high severity rating due to the potential for memory overflow issues.

2

How do I fix CVE-2025-6052?

To fix CVE-2025-6052, apply the latest security patches provided by the software vendor for GLib.

3

What are the potential impacts of CVE-2025-6052?

The potential impacts of CVE-2025-6052 include application crashes, data corruption, and possible remote code execution.

4

Which versions of GLib are affected by CVE-2025-6052?

CVE-2025-6052 affects multiple versions of GLib, specifically those that have not implemented the necessary memory management safeguards.

5

Can CVE-2025-6052 be exploited remotely?

Yes, CVE-2025-6052 can potentially be exploited remotely in applications that process untrusted input.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203