Command Injection Vulnerability in giting

giting Updated 02 Oct 2025

Summary

04/09/2020
CRITICAL
No i
Critical
Not published

GHSA-7r9x-hr76-jr96: Command Injection in giting. Affects giting versions >= 0.0.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The giting package is an npm package used for version control and managing Git repositories. It provides various functions and utilities for interacting with Git. However, all versions of giting are vulnerable to a Command Injection vulnerability. This vulnerability arises due to the package's failure to properly sanitize user input before passing it to an exec call. Specifically, the pull function is susceptible to command injection through the branch variable. This allows attackers to execute arbitrary code on the system, potentially leading to unauthorized access, data breaches, or other malicious activities.

Vulnerability Detail

The Command Injection vulnerability in giting allows an attacker to manipulate the branch variable and inject malicious commands. When the vulnerable code executes the pull function, it directly passes the user-controlled branch value to an exec call without proper validation or sanitization. This enables an attacker to execute arbitrary commands on the system with the privileges of the user running the vulnerable code. The impact of this vulnerability can be severe, as it grants unauthorized access and control over the affected system, potentially leading to further compromise or data exfiltration.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As there is no official fix available, it is crucial to exercise caution when using the giting package. Avoid passing user-controlled input directly to the branch variable in the pull function. Instead, implement strict input validation and sanitization to prevent command injection attacks. Here is an example of how to sanitize the branch variable in Node.js:

const { exec } = require('child_process');

function pull(branch) {
  const sanitizedBranch = branch.replace(/[;&|`$()\]/g, '');
  exec(`git pull origin ${sanitizedBranch}`, (error, stdout, stderr) => {
    // Handle the execution result
  });
}

Conclusion

The Command Injection vulnerability in giting poses a significant risk to systems utilizing this package. It allows attackers to execute arbitrary code on the system, potentially leading to unauthorized access, data breaches, or other malicious activities. Currently, there is no fix available, and it is recommended to avoid using the giting package until a patch or updated version is released. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for giting →

Share this vulnerability

FAQ

Giting is an npm package used for version control and managing Git repositories. It provides various functions and utilities for interacting with Git.

Command Injection is a security vulnerability that allows an attacker to execute arbitrary commands on a system. In the case of giting, the vulnerability arises due to the package's failure to properly sanitize user input before passing it to an exec call.

The Command Injection vulnerability in giting allows attackers to execute arbitrary code on the system with the privileges of the user running the vulnerable code. This can lead to unauthorized access, data breaches, or other malicious activities.

Currently, there is no fix available for this vulnerability. It is recommended to avoid using the giting package until a patch or updated version is released by the maintainers.

As a workaround, it is crucial to exercise caution when using the giting package. Avoid passing user-controlled input directly to the branch variable in the pull function. Implement strict input validation and sanitization to prevent command injection attacks.

Related vulnerabilities

Recent vulnerabilities recorded for giting.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback