CVE-2021-26541: Command injection in gitlog

gitlog Updated 02 Oct 2025

Summary

13/04/2021
Yes i
Critical
9.8

CVE-2021-26541: Command injection in gitlog. Affects gitlog versions < 4.0.4. Fixed in 4.0.4. 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 Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The gitlog package is an npm package that provides a command-line interface (CLI) tool for retrieving git commit history. It allows users to fetch commit logs and related information from a Git repository. The package is widely used by developers to analyze and track changes in their codebase.

Vulnerability Detail

The gitlog package before version 4.0.4 is affected by a command injection vulnerability. This vulnerability allows an attacker to execute arbitrary commands on the host system by injecting malicious input into the gitlog function. An attacker can exploit this vulnerability by crafting a specially crafted input that includes shell commands. If successfully exploited, this could lead to unauthorized access, data loss, or remote code execution on the affected system.

How To Fix

Minimum fixed version

4.0.4

This is the first release that contains the fix.

npm install gitlog@4.0.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is strongly recommended to upgrade to the latest version of gitlog to mitigate the risk.

Conclusion

The gitlog package before version 4.0.4 is affected by a critical command injection vulnerability. To mitigate the risk, it is strongly advised to upgrade to the latest version of gitlog (4.0.4 or later). This will ensure the security of your application and protect it from potential unauthorized access, data loss, or remote code execution. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for gitlog →

Share this vulnerability

FAQ

If exploited, this vulnerability can allow an attacker to execute arbitrary commands on the host system, potentially leading to unauthorized access, data loss, or remote code execution.

There is no known public exploit for this vulnerability at the time of this report. However, it is important to apply the recommended fix to prevent any potential exploitation.

No, only versions before 4.0.4 are affected by this vulnerability. It is recommended to upgrade to the latest version to ensure the security of your application.

Yes, this vulnerability can be exploited remotely if the affected application is exposed to the internet and the attacker can send malicious requests to the vulnerable endpoint.

There is no evidence of active exploitation of this vulnerability at the time of this report. However, it is always recommended to apply security patches and updates as soon as they are available.

How To Fix

Minimum fixed version

4.0.4

This is the first release that contains the fix.

npm install gitlog@4.0.4

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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