CVE-2025-26625: Git LFS may write to arbitrary files via crafted symlinks
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.
References
- cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-26625
- github.com/advisories/GHSA-6pvw-g552-53c5
- github.com/git-lfs/git-lfs
- github.com/git-lfs/git-lfs/commit/0cffe93176b870055c9dadbb3cc9a4a440e98396
- github.com/git-lfs/git-lfs/commit/5c11ffce9a4f095ff356bc781e2a031abb46c1a8
- github.com/git-lfs/git-lfs/commit/d02bd13f02ef76f6807581cd6b34709069cb3615
- github.com/git-lfs/git-lfs/releases/tag/v3.7.1
- github.com/git-lfs/git-lfs/security/advisories/GHSA-6pvw-g552-53c5
- nvd.nist.gov/vuln/detail/CVE-2025-26625
Code Behaviors & Features
Detect and mitigate CVE-2025-26625 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →