Git LFS discloses vulnerability that could enable remote command execution via SSH URLs

  • Git LFS
  • SSH URLs
  • remote command execution

The flaw affects versions 0.5.0–2.13.3 and 3.0.0–3.8.0

Git LFS fixed the issue by quoting remote-command arguments

Setting lfs.sshTransfer to never prevents object transfers over SSH

Git LFS disclosed a vulnerability on November 20, 2026, that could allow attackers to run arbitrary commands on a remote host by crafting an SSH URL. The advisory was published on GitHub.

The flaw occurs when Git LFS makes object-transfer or authentication requests over SSH. It fails to format the URL’s path component as a single argument; if the remote host passes the resulting command to a shell without sanitizing it, shell meta-characters in the URL can trigger commands on that host.

The affected versions are Git LFS 0.5.0 through 2.13.3 and 3.0.0 through 3.8.0. Git LFS addressed the issue by fully quoting arguments in remote commands sent over SSH.

As a workaround, users can set the Git configuration option `lfs.sshTransfer` to `never`, which prevents object transfers over SSH.