CVE-2025-4373
Medium · 4.8CVSS
4.8
EPSS
0.6%
Published
May 6, 2025
CISA due date
—
Cloudanix analysis
A programming library used by many applications has a flaw that can let attackers cause crashes or small unwanted changes in memory when handling certain text operations.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- High
- Impact
- Data Tampering
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Integer overflow in g_string_insert_unichar() when a large insertion position is supplied, resulting in a buffer underwrite that corrupts adjacent memory.
Why it matters to the business
Applications built on GLib may experience crashes or limited unintended memory changes, potentially disrupting services or enabling further attacks in high-value environments; prevalence across many Linux and cross-platform apps increases exposure surface.
How an attack unfolds
An attacker identifies a code path that invokes g_string_insert_unichar() with attacker-controlled position values, supplies an oversized position to trigger the overflow, and causes a targeted underwrite to alter memory layout for denial-of-service or limited integrity impact.
How to fix it
Upgrade GLib to a version that corrects the integer handling in g_string_insert_unichar(); rebuild and redeploy dependent applications; apply vendor patches promptly once released.
How to confirm the fix worked
Review GLib source or release notes for corrected position calculation logic; perform fuzz testing with large position values; confirm absence of underwrite behavior in updated builds via memory sanitizer runs.
Typical attack path
- Locate or trigger a GLib-based component that processes untrusted input through string insertion routines
- Craft a request or data structure containing an extremely large insertion position value
- Invoke the vulnerable function to induce integer overflow and subsequent buffer underwrite
- Observe resulting memory corruption effects such as crashes or data alteration
How to detect it
Search application and system logs for segmentation faults or memory errors originating from GLib string functions; monitor for unexpected process terminations after handling large or malformed input strings.
What your security team should do
- Prioritize GLib updates in all affected environments given widespread library usage
- Monitor upstream GLib announcements for patch availability and schedule rapid deployment
- Add input validation wrappers around string operations in custom code until library fixes are applied
The record
A flaw was found in GLib, which is vulnerable to an integer overflow in the g_string_insert_unichar() function. When the position at which to insert the character is large, the position will overflow, leading to a buffer underwrite.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | glib2 | 0 | 2.56.4-166.el8_10 |
| AlmaLinux:8 | glib2-devel | 0 | 2.56.4-166.el8_10 |
| AlmaLinux:8 | glib2-doc | 0 | 2.56.4-166.el8_10 |
| AlmaLinux:8 | glib2-fam | 0 | 2.56.4-166.el8_10 |
| AlmaLinux:8 | glib2-static | 0 | 2.56.4-166.el8_10 |
| AlmaLinux:8 | glib2-tests | 0 | 2.56.4-166.el8_10 |
| AlmaLinux:9 | glib2 | 0 | 2.68.4-16.el9_6.2 |
| AlmaLinux:9 | glib2-devel | 0 | 2.68.4-16.el9_6.2 |
| AlmaLinux:9 | glib2-doc | 0 | 2.68.4-16.el9_6.2 |
| AlmaLinux:9 | glib2-static | 0 | 2.68.4-16.el9_6.2 |
| AlmaLinux:9 | glib2-tests | 0 | 2.68.4-16.el9_6.2 |
| Debian:11 | glib2.0 | 0 | No fix |
| Debian:12 | glib2.0 | 0 | No fix |
| Debian:13 | glib2.0 | 0 | No fix |
| Debian:14 | glib2.0 | 0 | 2.84.1-3 |
| Mageia:9 | glib2.0 | 0 | 2.76.3-1.4.mga9 |
| SUSE:Linux Enterprise Micro 5.1 | glib2 | 0 | 2.62.6-150200.3.30.1 |
| SUSE:Linux Enterprise Micro 5.2 | glib2 | 0 | 2.62.6-150200.3.30.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | glib2 | 0 | 2.78.6-150600.4.16.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | glib2 | 0 | 2.78.6-150600.4.16.1 |
| SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | glib2 | 0 | 2.48.2-12.46.1 |
| openSUSE:Leap 15.6 | glib2 | 0 | 2.78.6-150600.4.16.1 |
| openSUSE:Leap 15.6 | glib2-doc | 0 | 2.78.6-150600.4.16.1 |
Related vulnerabilities
- CVE-2025-13601 A heap-based buffer overflow problem was found in glib through an incorrect calculation… Also affects glib2
- CVE-2024-52533 gio/gsocks4aproxy.c in GNOME GLib before 2.82.1 has an off-by-one error and resultant… Also affects glib2
- CVE-2024-34397 An issue was discovered in GNOME GLib before 2.78.5, and 2.79.x and 2.80.x before 2.80.1. Also affects glib2
- CVE-2023-32611 A flaw was found in GLib. Also affects glib2
- CVE-2025-7039 A flaw was found in glib. Also affects glib2.0
- CVE-2025-3360 A flaw was found in GLib. Also affects glib2.0
- CVE-2025-6052 A flaw was found in how GLib’s GString manages memory when adding data to strings. Also affects glib2.0
- CVE-2026-0988 A flaw was found in glib. Also affects glib2.0