# CVE-2025-59831: `git-comiters` Command Injection vulnerability


- **Severity:** High 8.7 (`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`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 25 Sep 2025
- **Updated:** 25 Sep 2025
- **Also known as:** GHSA-g38c-wxjf-xrh6

## What is CVE-2025-59831?

CVE-2025-59831 is a high-severity vulnerability in snowyu git-commiters.js, published on 25 Sep 2025. 

### Official description

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.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command), CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2025-59831?

2 open source packages ship an affected version, including git-commiters. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `git-commiters` | npm | All versions | 0.1.2 |
| `git-commiters` | npm | All versions | 0.1.2 |

Products: Riceball Git-Commiters.

## How do I fix CVE-2025-59831?

Upgrade git-commiters to 0.1.2 or later.

## Is CVE-2025-59831 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-59831 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-59831 and fix it if it is affected.

What it is: CVE-2025-59831 is a high-severity vulnerability in snowyu git-commiters.js, published on 25 Sep 2025. 
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-59831 exists.

Affected packages and fixed versions:
- git-commiters (npm): affected all versions; fixed in 0.1.2
- git-commiters (npm): affected all versions; fixed in 0.1.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-59831/ (Markdown: https://insights.sbomify.com/CVE-2025-59831/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-59831
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-59831
- OSV: https://osv.dev/vulnerability/CVE-2025-59831

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-59831/
Summaries are generated and may contain mistakes; the official description above is the record.
