Command Injection Affecting git-commiters package, versions <0.1.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-GITCOMMITERS-13004666
  • published23 Sept 2025
  • disclosed22 Sept 2025
  • creditLiran Tal

Introduced: 22 Sep 2025

NewCVE-2025-59831  (opens in a new tab)
CWE-77  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade git-commiters to version 0.1.2 or higher.

Overview

git-commiters is a Statistical summary of various infomation about git commiter.

Affected versions of this package are vulnerable to Command Injection via the gitCommiters() API which allows specifying options such as cwd for current working directory and revisionRange as a revision pointer, such as HEAD without proper sanitization. An attacker can execute arbitrary system commands by supplying crafted input to the revisionRange option.

PoC

  1. Install git-commiters@0.1.1 or earlier
  2. Initialize a new Git directory with commits in it
  3. Create the following script in that directory:
var gitCommiters = require("git-commiters");

var options = { cwd: "./", revisionRange: "HEAD; touch /tmp/pwn; #", }; gitCommiters(options, function (err, result) { if (err) console.log(err); else console.log(result); });

  1. Observe new file created on disk at /tmp/pwn

References

CVSS Base Scores

version 4.0
version 3.1