Rapid7 Vulnerability & Exploit Database

Git LFS Clone Command Exec

Back to Search

Git LFS Clone Command Exec

Disclosed
04/26/2021
Created
08/27/2021

Description

Git clients that support delay-capable clean / smudge filters and symbolic links on case-insensitive file systems are vulnerable to remote code execution while cloning a repository. Usage of clean / smudge filters through Git LFS and a case-insensitive file system changes the checkout order of repository files which enables the placement of a Git hook in the `.git/hooks` directory. By default, this module writes a `post-checkout` script so that the payload will automatically be executed upon checkout of the repository.

Author(s)

  • Johannes Schindelin
  • Matheus Tavares
  • Shelby Pace

Platform

Unix

Architectures

cmd

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/http/git_lfs_clone_command_exec
msf exploit(git_lfs_clone_command_exec) > show targets
    ...targets...
msf exploit(git_lfs_clone_command_exec) > set TARGET < target-id >
msf exploit(git_lfs_clone_command_exec) > show options
    ...show and set options...
msf exploit(git_lfs_clone_command_exec) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;