CVE-2025-26625
Ruby vulnerability analysis and mitigation

Overview

CVE-2025-26625 is an improper link resolution vulnerability in Git LFS (Large File Storage) that allows an attacker to write arbitrary files outside the current Git working tree. Affecting all Git LFS versions from 0.5.2 through 3.7.0, the flaw exists in the git lfs checkout and git lfs pull commands, which fail to check for symbolic or hard links before writing LFS object content to the working tree. The vulnerability was reported by Apple Product Security and disclosed on October 17, 2025, with a fix released the same day in version 3.7.1. It carries a CVSS v3.1 base score of 8.1 (High) and a CVSS v4.0 base score of 8.6 (High) (GitHub Advisory, Git LFS Release).

Technical details

The root cause is classified as CWE-59 (Improper Link Resolution Before File Access / 'Link Following'). The git lfs checkout and git lfs pull commands used Go's os.Create() function, which follows symbolic links when creating or truncating files, and did not validate whether path components contained symbolic links pointing outside the working tree. An attacker crafts a malicious repository containing symbolic or hard links whose paths collide with Git LFS-tracked file paths; when a victim clones or pulls from this repository and runs the affected commands, Git LFS writes LFS object content to the symlink's target — potentially any filesystem location accessible to the user. A secondary issue allowed these commands, when run in a bare repository, to treat relative repository paths as absolute filesystem paths (e.g., foo/bar becoming /foo/bar), potentially writing files outside the repository. The fix introduced a DirWalker structure that checks each path component for symlinks before writing, and replaced os.Create() with os.Remove() followed by os.OpenFile() with O_CREATE|O_EXCL flags to prevent following links and break hard links (GitHub Advisory, Commit 5c11ffc, Commit 0cffe93).

Impact

Successful exploitation allows an unauthenticated attacker (who convinces a user to clone or pull from a malicious repository) to write arbitrary file content to any filesystem location accessible to the victim user, with high confidentiality and integrity impact. This could result in overwriting sensitive configuration files, SSH authorized keys, shell profiles, or other executable locations, potentially leading to code execution under the victim's account. Availability is not directly impacted, but the ability to overwrite arbitrary files creates significant risk for privilege escalation and persistence (GitHub Advisory, Feedly).

Exploitability

No public proof-of-concept exploit code was available at the time of disclosure, and there is no evidence of in-the-wild exploitation. The vulnerability requires user interaction — specifically, a victim must clone or pull from an attacker-controlled repository and run git lfs checkout or git lfs pull. The EPSS score is approximately 0.019% (very low), reflecting the limited exploitation evidence. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. A GitHub repository (Mitchellzhou1/CVE_2025_26625) appeared shortly after disclosure, though its content and nature are unconfirmed (GitHub Advisory, Feedly).

Exploitation steps

  1. Craft a malicious repository: Create a Git repository containing Git LFS-tracked files. Add symbolic links (or hard links) at paths that collide with LFS-tracked file paths — for example, create a symlink lfs-file.bin -> /home/victim/.ssh/authorized_keys where lfs-file.bin is tracked by Git LFS.
  2. Host the repository: Make the malicious repository available via a public or private Git hosting service, or a self-hosted server accessible to the target.
  3. Social engineer the victim: Convince the target user to clone the repository using git clone <malicious-repo-url> or to pull from it.
  4. Trigger LFS checkout: The victim runs git lfs pull or git lfs checkout (which may happen automatically during clone with smudge filters enabled). Git LFS resolves the symlink without checking it, writing the LFS object content to the symlink's target (e.g., overwriting ~/.ssh/authorized_keys with attacker-controlled content).
  5. Achieve objective: Depending on the target file overwritten, the attacker may gain SSH access, inject malicious scripts into shell profiles, or achieve other forms of code execution or data manipulation (GitHub Advisory, Commit 5c11ffc).

Indicators of compromise

  • File System: Unexpected modification timestamps on sensitive files (e.g., ~/.ssh/authorized_keys, ~/.bashrc, ~/.profile, cron files) coinciding with a git lfs checkout or git lfs pull operation; presence of symbolic or hard links in a cloned repository's working tree pointing to locations outside the repository root.
  • Logs: Shell history or audit logs showing git lfs checkout or git lfs pull commands executed against an unfamiliar or external repository URL; file access audit events (e.g., via auditd) showing Git LFS processes writing to paths outside the expected working tree.
  • Process: Unexpected file write operations by the git-lfs process to paths outside the cloned repository directory, observable via tools like strace, inotifywait, or endpoint detection agents.
  • Network: Outbound connections to unfamiliar Git LFS servers or object storage endpoints during a git lfs pull operation from an untrusted repository.

Mitigation and workarounds

Upgrade Git LFS to version 3.7.1 or later, which introduces symlink checks before writing files and uses O_CREATE|O_EXCL to prevent link following. As a temporary workaround, disable symlink support in Git by setting git config core.symlinks false; this prevents new clones and fetches from creating symbolic links, but does not protect against existing symlinks or hard links already present in a repository. Users should also avoid running git lfs checkout or git lfs pull against untrusted repositories, and should not run these commands with elevated privileges. Downstream distributions including Red Hat, Fedora, Ubuntu, Debian, AlmaLinux, Rocky Linux, and Oracle Linux have released updated packages (Git LFS Release, GitHub Advisory, Red Hat Advisory).

Community reactions

The vulnerability was responsibly disclosed by Apple Product Security and credited in the Git LFS v3.7.1 release notes. The fix was developed by maintainer chrisd8088 and released the same day as disclosure. Downstream Linux distributions (Red Hat, Fedora, Ubuntu, Debian, AlmaLinux, Rocky Linux, Oracle Linux) promptly issued security advisories and updated packages. Community discussion was limited, consistent with the low EPSS score and absence of public exploitation (Git LFS Release, GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-71847HIGH8.7
  • Ruby logoRuby
  • ruby3.2-rails-8.1
NoYesAug 07, 2026
CVE-2026-45414HIGH8.5
  • Ruby logoRuby
  • decidim
NoYesAug 06, 2026
CVE-2026-45573MEDIUM6.4
  • Ruby logoRuby
  • decidim-core
NoYesAug 06, 2026
CVE-2026-45415MEDIUM6
  • Ruby logoRuby
  • decidim-verifications
NoYesAug 06, 2026
CVE-2026-45572MEDIUM4.8
  • Ruby logoRuby
  • decidim-core
NoYesAug 06, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management