Insufficient validation of options passed to the `git rm` and `git checkout` commands within the `IndexFile.remove()` and `Head.checkout()` functions allows for arbitrary file reading. An attacker can provide the `--pathspec-from-file` and `--pathspec-file-nul` parameters to access files readable by the process, with the contents returned in `GitCommandError.stderr`.