Git LFS may write to arbitrary files via crafted symlinks
Published 17 Oct 2025 · Updated 31 May 2026
Is your project on an affected github.com/git-lfs/git-lfs?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=0.5.2 <3.7.1
- Fixed in
- 3.7.1
go get github.com/git-lfs/git-lfs@v3.7.1Details
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
- https://github.com/git-lfs/git-lfs/security/advisories/GHSA-6pvw-g552-53c5
- https://nvd.nist.gov/vuln/detail/CVE-2025-26625
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-26625
- https://github.com/git-lfs/git-lfs/releases/tag/v3.7.1
- git-lfs/git-lfs@5c11ffce9a
- git-lfs/git-lfs@0cffe93176
- git-lfs/git-lfs@d02bd13f02
For more information
If there are any questions or comments about this advisory:
- For general questions, start a discussion in the Git LFS discussion forum.
- For reports of additional vulnerabilities, please follow the Git LFS security reporting policy.
Is GHSA-6pvw-g552-53c5 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/git-lfs/git-lfs, and gives you the command that fixes it.
More advisories for github.com/git-lfs/git-lfs
- LowCVE-2024-53263Git LFS permits exfiltration of credentials via crafted HTTP URLs in github.com/git-lfs/git-lfs · 15 Jan 2025
- HighCVE-2024-53263Git LFS permits exfiltration of credentials via crafted HTTP URLs · 14 Jan 2025
- HighCVE-2017-17831GitHub Git LFS Arbitrary command execution vulnerability · 14 May 2022
- CriticalCVE-2022-24826Git LFS can execute a binary from the current directory on Windows · 22 Apr 2022
- HighCVE-2021-21237Git LFS can execute a Git binary from the current directory on Windows · 15 Feb 2022
- CriticalCVE-2020-27955Git LFS can execute a Git binary from the current directory · 11 Feb 2022
References
- Linkgithub.com/git-lfs/git-lfs/security/advisories/GHSA-6pvw-g552-53c5
- Advisorynvd.nist.gov/vuln/detail/CVE-2025-26625
- Linkgithub.com/git-lfs/git-lfs/commit/0cffe93176b870055c9dadbb3cc9a4a440e98396
- Linkgithub.com/git-lfs/git-lfs/commit/5c11ffce9a4f095ff356bc781e2a031abb46c1a8
- Linkgithub.com/git-lfs/git-lfs/commit/d02bd13f02ef76f6807581cd6b34709069cb3615
- Linkcve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-26625
- Packagegithub.com/git-lfs/git-lfs
- Linkgithub.com/git-lfs/git-lfs/releases/tag/v3.7.1
- Linklists.debian.org/debian-lts-announce/2026/05/msg00055.html
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.