CVE-2025-7039 Glib: buffer under-read on glib through glib/gfileutils.c via get_tmp_file()

Low 3.7 Published Updated

A local attacker can exploit an integer overflow in GLib's temporary file creation to perform path traversal and access unauthorized private file content.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-7039?

CVE-2025-7039 is a low-severity path traversal vulnerability in Red Hat Enterprise Linux 10, published on 3 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A flaw was found in glib. An integer overflow during temporary file creation leads to an out-of-bounds memory access, allowing an attacker to potentially perform path traversal or access private temporary file content by creating symbolic links. This vulnerability allows a local attacker to manipulate file paths and access unauthorized data. The core issue stems from insufficient validation of file path lengths during temporary file operations.

Weakness: CWE-22

Which versions are affected by CVE-2025-7039?

Linux distribution packages (12)
glib2 SUSE:Linux Enterprise Micro 5.2All versions2.62.6-150200.3.33.1
glib2 SUSE:Linux Enterprise Micro 5.3All versions2.70.5-150400.3.26.1
glib2 SUSE:Linux Enterprise Micro 5.4All versions2.70.5-150400.3.26.1
glib2 SUSE:Linux Enterprise Micro 5.5All versions2.70.5-150400.3.26.1
glib2 SUSE:Linux Enterprise Module for Basesystem 15 SP6All versions2.78.6-150600.4.22.1
glib2 SUSE:Linux Enterprise Module for Basesystem 15 SP7All versions2.78.6-150600.4.22.1
glib2 SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5All versions2.48.2-12.49.1
glib2 SUSE:Linux Micro 6.0All versions2.76.2-10.1
glib2 SUSE:Linux Micro 6.1All versions2.78.6-slfo.1.1_5.1
glib2 openSUSE:Leap 15.6All versions2.78.6-150600.4.22.1
glib2-doc openSUSE:Leap 15.6All versions2.78.6-150600.4.22.1
glib2 openSUSE:TumbleweedAll versions2.84.4-1.1

How do I fix CVE-2025-7039?

Apply the vendor's patch.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-7039 being exploited?

There is no known exploitation of CVE-2025-7039 in the wild and no public exploit code.

Sources

Also known as AZL-66780, AZL-66783, BELL-CVE-2025-7039, DEBIAN-CVE-2025-7039, ECHO-38c7-8809-a5fd, GHSA-wcxv-32f4-xr5v and 14 more.

Is CVE-2025-7039 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free