CVE-2025-26625
JSON

8.6high

Git LFS may write to arbitrary files via crafted symlinks

Severity
8.6high CVSS:4.0 by GitHub_M
Exploit likelihood
1.05% (higher than 65% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6pvw-g552-53c5BIT-GIT-LFS-2025-26625GO-2025-4038

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.

Affected

Product or packageVersionsReported by
git-lfs git-lfs>= 0.5.2, < 3.7.1CVE List
github.com/git-lfs/git-lfs (Go)from 0.5.2 before 3.7.1, from 0.5.2GitHub Advisory Database, Go Vulnerability Database
github.com/git-lfs/git-lfs/v3 (Go)before 3.7.1Go Vulnerability Database
git-lfs (Bitnami)from 0.5.2 before 3.7.1Bitnami Vulnerability Database

All scores

GitHub_M8.6high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
Bitnami Vulnerability Databasehigh rating

Classification

CWE-59

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
Impact

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.

Git LFS has resolved this problem by revising the git lfs checkout and git lfs pull commands so that they check for symbolic links in the same manner as performed by Git before writing to files in the working tree. These commands now also remove existing files in the working tree before writing new files in their place.

As well, Git LFS has resolved a problem whereby the git lfs checkout and git lfs pull commands, when run in a bare repository, could write to files visible outside the repository. While a specific and relatively unlikely set of conditions were required for this to occur, it is no longer possible under any circumstances.

Patches

This problem exists in all versions since 0.5.2 and is patched in v3.7.1. All users should upgrade to v3.7.1.

Workarounds

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.

References
For more information

If there are any questions or comments about this advisory:

Go Vulnerability Database

Git LFS may write to arbitrary files via crafted symlinks in github.com/git-lfs/git-lfs

NVD (es)

Git LFS es una extensión de Git para el control de versiones de archivos grandes. En las versiones de Git LFS de la 0.5.2 a la 3.7.0, al poblar el árbol de trabajo de un repositorio Git con el contenido de objetos Git LFS, ciertos comandos de Git LFS pueden escribir en archivos visibles fuera del árbol de trabajo de Git actual si existen enlaces simbólicos o duros que colisionan con las rutas de los archivos rastreados por Git LFS. Los comandos git lfs checkout y git lfs pull no verifican la existencia de enlaces simbólicos antes de escribir en archivos en el árbol de trabajo, permitiendo a un atacante crear un repositorio que contenga enlaces simbólicos o duros que hagan que Git LFS escriba en ubicaciones arbitrarias del sistema de archivos accesibles para el usuario que ejecuta estos comandos. Además, cuando los comandos git lfs checkout y git lfs pull se ejecutan en un repositorio bare, podrían escribir en archivos visibles fuera del repositorio. La vulnerabilidad está corregida en la versión 3.7.1. Como solución alternativa, el soporte para symlinks en Git puede deshabilitarse configurando la opción de configuración core.symlinks en false, después de lo cual las futuras clonaciones y recuperaciones no crearán enlaces simbólicos. Sin embargo, cualquier enlace simbólico o duro en los repositorios existentes aún proporcionará la oportunidad para que Git LFS escriba en sus destinos.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-26625 changed 2026-10-21CVE Terms of Use
GitHub Advisory DatabaseGHSA-6pvw-g552-53c5 changed 2026-05-31CC-BY-4.0
Go Vulnerability DatabaseGO-2025-4038 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-26625 changed 2026-10-21Public domain
Bitnami Vulnerability DatabaseBIT-GIT-LFS-2025-26625 changed 2026-10-22Apache-2.0