CVE-2025-14087: Glib: glib: buffer underflow in gvariant parser leads to heap corruption
A buffer-underflow vulnerability exists in GLib’s GVariant parser, specifically within bytestringparse() and stringparse(). The parser uses signed 32-bit integers (gint) as loop indices (i and j). When extremely large strings are parsed, these counters overflow into negative values, causing the parser to write to memory before the start of the allocated buffer (str[j++]). This results in a classic out-of-bounds write condition. Because GVariant parsing is often performed on attacker-influenced data, a remote attacker can trigger heap corruption, causing a crash or potentially achieving code execution. This flaw has been confirmed by maintainers and patched upstream.
Other sources
A flaw was found in GLib (Gnome Lib). This vulnerability allows a remote attacker to cause heap corruption, leading to a denial of service or potential code execution via a buffer-underflow in the GVariant parser when processing maliciously crafted input strings.
— MITRE
Glib: glib: buffer underflow in gvariant parser leads to heap corruption
— Microsoft
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-14087?
CVE-2025-14087 is classified as a high severity vulnerability due to its potential for causing denial of service and code execution.
How do I fix CVE-2025-14087?
To fix CVE-2025-14087, update GLib to the latest version that addresses the buffer-underflow vulnerability.
What types of attacks can CVE-2025-14087 facilitate?
CVE-2025-14087 can facilitate remote attacks that lead to heap corruption, causing denial of service or potential code execution.
Which software is affected by CVE-2025-14087?
CVE-2025-14087 specifically affects GLib, commonly used in various applications for handling data types.
Is user intervention required to exploit CVE-2025-14087?
Yes, exploitation of CVE-2025-14087 requires that a user processes maliciously crafted input strings.