# CVE-2025-26625: Git LFS may write to arbitrary files via crafted symlinks

> Git LFS allows arbitrary file writes via crafted symlinks during checkout or pull, enabling attackers to modify files outside the repository.

- **Severity:** High 8.6 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 17 Oct 2025
- **Updated:** 21 Oct 2026
- **Also known as:** ALSA-2025:23667, ALSA-2025:23744, ALSA-2025:23745, BIT-git-lfs-2025-26625, CLSA-2025-1767003835, DEBIAN-CVE-2025-26625, ECHO-b5a4-ec2d-5f68, GHSA-6pvw-g552-53c5, GO-2025-4038, MINI-629m-6j4q-4ff8, RHSA-2025:23667, RHSA-2025:23744, RHSA-2025:23745, RHSA-2026:0199, RHSA-2026:0203, RHSA-2026:0204, RHSA-2026:0224, RHSA-2026:0459, RHSA-2026:0460, RHSA-2026:0465, RHSA-2026:0472, RLSA-2025:23667, RLSA-2025:23744, RLSA-2025:23745, SUSE-SU-2026:3801-1, UBUNTU-CVE-2025-26625, openSUSE-SU-2025:15643-1

## What is CVE-2025-26625?

CVE-2025-26625 is a high-severity path traversal vulnerability in git-lfs, published on 17 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Git LFS is a Git extension for versioning large files. In Git LFS versions 0.5.2 through 3.7.0, when populating a Git repository's working tree with the contents of Git LFS objects, certain Git LFS commands may write to files visible outside the current Git working tree if symbolic or hard links exist which collide with the paths of files tracked by Git LFS. The git lfs checkout and git lfs pull commands do not check for symbolic links before writing to files in the working tree, allowing an attacker to craft a repository containing symbolic or hard links that cause Git LFS to write to arbitrary file system locations accessible to the user running these commands. As well, when the git lfs checkout and git lfs pull commands are run in a bare repository, they could write to files visible outside the repository. The vulnerability is fixed in version 3.7.1. As a workaround, support for symlinks in Git may be disabled by setting the core.symlinks configuration option to false, after which further clones and fetches will not create symbolic links. However, any symbolic or hard links in existing repositories will still provide the opportunity for Git LFS to write to their targets.

Weakness: CWE-59 (Improper Link Resolution Before File Access)

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

5 open source packages ship an affected version, including github.com/git-lfs/git-lfs, git-lfs and github.com/git-lfs/git-lfs/v3.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/git-lfs/git-lfs` | Go | From 0.5.2 | None |
| `github.com/git-lfs/git-lfs` | Go | From 0.5.2 | 3.7.1 |
| `github.com/git-lfs/git-lfs` | Go | From 0.5.2 | 3.7.1 |
| `git-lfs` | Bitnami | From 0.5.2 | 3.7.1 |
| `github.com/git-lfs/git-lfs/v3` | Go | All versions | 3.7.1 |
| `git-lfs` | AlmaLinux:10 | All versions | 3.6.1-4.el10_1 |
| `git-lfs` | AlmaLinux:8 | All versions | 3.4.1-6.el8_10 |
| `git-lfs` | AlmaLinux:9 | All versions | 3.6.1-4.el9_7 |
| `git-lfs` | Red Hat:enterprise_linux:10.1 | All versions | 0:3.6.1-4.el10_1 |
| `git-lfs-debuginfo` | Red Hat:enterprise_linux:10.1 | All versions | 0:3.6.1-4.el10_1 |
| `git-lfs-debugsource` | Red Hat:enterprise_linux:10.1 | All versions | 0:3.6.1-4.el10_1 |
| `git-lfs` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.4.1-6.el8_10 |
| `git-lfs-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.4.1-6.el8_10 |
| `git-lfs-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:3.4.1-6.el8_10 |
| `git-lfs` | Red Hat:enterprise_linux:9::appstream | All versions | 0:3.6.1-4.el9_7 |
| `git-lfs-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 0:3.6.1-4.el9_7 |
| `git-lfs-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 0:3.6.1-4.el9_7 |
| `git-lfs` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:3.6.1-2.el10_0.1 |
| `git-lfs-debuginfo` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:3.6.1-2.el10_0.1 |
| `git-lfs-debugsource` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:3.6.1-2.el10_0.1 |
| `git-lfs` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.13.3-3.el8_4.3 |
| `git-lfs-debuginfo` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.13.3-3.el8_4.3 |
| `git-lfs-debugsource` | Red Hat:rhel_aus:8.4::appstream | All versions | 0:2.13.3-3.el8_4.3 |
| `git-lfs` | Red Hat:rhel_aus:8.6::appstream | All versions | 0:2.13.3-3.el8_6.5 |
| `git-lfs-debuginfo` | Red Hat:rhel_aus:8.6::appstream | All versions | 0:2.13.3-3.el8_6.5 |
| `git-lfs-debugsource` | Red Hat:rhel_aus:8.6::appstream | All versions | 0:2.13.3-3.el8_6.5 |
| `git-lfs` | Red Hat:rhel_e4s:8.6::appstream | All versions | 0:2.13.3-3.el8_6.5 |
| `git-lfs-debuginfo` | Red Hat:rhel_e4s:8.6::appstream | All versions | 0:2.13.3-3.el8_6.5 |
| `git-lfs-debugsource` | Red Hat:rhel_e4s:8.6::appstream | All versions | 0:2.13.3-3.el8_6.5 |
| `git-lfs` | Red Hat:rhel_e4s:8.8::appstream | All versions | 0:3.2.0-2.el8_8.5 |
| `git-lfs-debuginfo` | Red Hat:rhel_e4s:8.8::appstream | All versions | 0:3.2.0-2.el8_8.5 |
| `git-lfs-debugsource` | Red Hat:rhel_e4s:8.8::appstream | All versions | 0:3.2.0-2.el8_8.5 |
| `git-lfs` | Red Hat:rhel_e4s:9.0::appstream | All versions | 0:2.13.3-5.el9_0.5 |
| `git-lfs-debuginfo` | Red Hat:rhel_e4s:9.0::appstream | All versions | 0:2.13.3-5.el9_0.5 |
| `git-lfs-debugsource` | Red Hat:rhel_e4s:9.0::appstream | All versions | 0:2.13.3-5.el9_0.5 |
| `git-lfs` | Red Hat:rhel_e4s:9.2::appstream | All versions | 0:3.2.0-2.el9_2.4 |
| `git-lfs-debuginfo` | Red Hat:rhel_e4s:9.2::appstream | All versions | 0:3.2.0-2.el9_2.4 |
| `git-lfs-debugsource` | Red Hat:rhel_e4s:9.2::appstream | All versions | 0:3.2.0-2.el9_2.4 |
| `git-lfs` | Red Hat:rhel_eus:9.4::appstream | All versions | 0:3.4.1-4.el9_4.3 |
| `git-lfs-debuginfo` | Red Hat:rhel_eus:9.4::appstream | All versions | 0:3.4.1-4.el9_4.3 |

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

Upgrade github.com/git-lfs/git-lfs to 3.7.1 or later.

## Is CVE-2025-26625 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2025-26625 is a high-severity path traversal vulnerability in git-lfs, published on 17 Oct 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2025-26625 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/git-lfs/git-lfs (Go): affected from 0.5.2; no fix listed
- github.com/git-lfs/git-lfs (Go): affected from 0.5.2; fixed in 3.7.1
- github.com/git-lfs/git-lfs (Go): affected from 0.5.2; fixed in 3.7.1
- git-lfs (Bitnami): affected from 0.5.2; fixed in 3.7.1
- github.com/git-lfs/git-lfs/v3 (Go): affected all versions; fixed in 3.7.1

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-26625/ (Markdown: https://insights.sbomify.com/CVE-2025-26625/index.md)
```

## Sources

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

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