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

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

- **Severity:** Low 3.7 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 3 Sep 2025
- **Updated:** 2 Jun 2026
- **Also known as:** AZL-66780, AZL-66783, BELL-CVE-2025-7039, DEBIAN-CVE-2025-7039, ECHO-38c7-8809-a5fd, GHSA-wcxv-32f4-xr5v, OESA-2025-2017, OESA-2025-2018, OESA-2025-2019, OESA-2025-2020, OESA-2025-2021, OESA-2025-2063, SUSE-SU-2025:21063-1, SUSE-SU-2025:21201-1, SUSE-SU-2025:4186-1, SUSE-SU-2025:4278-1, SUSE-SU-2025:4308-1, SUSE-SU-2025:4347-1, UBUNTU-CVE-2025-7039, openSUSE-SU-2025:15432-1

## 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 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2025-7039?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `glib2` | SUSE:Linux Enterprise Micro 5.2 | All versions | 2.62.6-150200.3.33.1 |
| `glib2` | SUSE:Linux Enterprise Micro 5.3 | All versions | 2.70.5-150400.3.26.1 |
| `glib2` | SUSE:Linux Enterprise Micro 5.4 | All versions | 2.70.5-150400.3.26.1 |
| `glib2` | SUSE:Linux Enterprise Micro 5.5 | All versions | 2.70.5-150400.3.26.1 |
| `glib2` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 2.78.6-150600.4.22.1 |
| `glib2` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 2.78.6-150600.4.22.1 |
| `glib2` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 2.48.2-12.49.1 |
| `glib2` | SUSE:Linux Micro 6.0 | All versions | 2.76.2-10.1 |
| `glib2` | SUSE:Linux Micro 6.1 | All versions | 2.78.6-slfo.1.1_5.1 |
| `glib2` | openSUSE:Leap 15.6 | All versions | 2.78.6-150600.4.22.1 |
| `glib2-doc` | openSUSE:Leap 15.6 | All versions | 2.78.6-150600.4.22.1 |
| `glib2` | openSUSE:Tumbleweed | All versions | 2.84.4-1.1 |

## How do I fix CVE-2025-7039?

Apply the vendor's patch.

## Is CVE-2025-7039 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-7039 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2025-7039 in the wild and no public exploit code.

Affected product: Red Hat Enterprise Linux 10. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-7039/ (Markdown: https://insights.sbomify.com/CVE-2025-7039/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-7039
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-7039
- OSV: https://osv.dev/vulnerability/CVE-2025-7039

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-7039/
Summaries are generated and may contain mistakes; the official description above is the record.
