# CVE-2026-28291: steveukx simple-git command injection via option-parsing bypass

Source: https://junglewise.ai/threats/cve-2026-28291-steveukx-simple-git-command-injection-via-option-parsing-bypass  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-13. Updated: 2026-06-30  
License: CC BY 4.0 with a link back

CVE-2026-28291 · Severity: high · CVSS 8.1 · Published 2026-04-13

simple-git is a popular library used by developers to run Git commands within JavaScript applications. A security flaw allows attackers to bypass safety filters and execute unauthorized system commands by disguising dangerous Git options. This could lead to full system compromise or unauthorized data access if an application passes untrusted user input to the library.

Technologies: [simple-git (npm)](https://junglewise.ai/threats/technologies/simple-git). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-28291 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-28291 being exploited in the wild.

**How severe is CVE-2026-28291?** High severity, with a CVSS score of 8.1, published 13 April 2026.

**Which products and versions are affected?** simple-git (npm) < 3.32.0, SEMVER:introduced=0,fixed=3.32.0.

**Is there a fix for CVE-2026-28291?** Yes. simple-git (npm): upgrade to 3.32.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-28291 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-28291?** Check whether you run simple-git (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- simple-git (npm): upgrade to 3.32.0 or later

  ```sh
  npm install simple-git@3.32.0
  ```


## Technical details

A command injection vulnerability exists in simple-git due to an incomplete fix for CVE-2022-25860. The library's 'unsafe operations' plugin uses a regular-expression-based blocklist to prevent dangerous Git flags (like --upload-pack or -u in clone operations) that can trigger arbitrary command execution. However, Git's flexible option parsing allows attackers to combine flags (e.g., -vu, -4u) or use specific character sequences that circumvent these regex checks. An attacker who can control the arguments passed to Git methods can achieve arbitrary code execution on the host system. The issue is addressed in version 3.32.0 by enhancing the option-blocking logic.

## Affected products

- steveukx simple-git <= 3.31.1

## Identifiers

- CVE-2026-28291
- GHSA-jcxm-m3jx-f287

## Timeline

- 2026-02-21: patched: Fix committed and version 3.32.0 released
- 2026-04-12: advisory: GitHub Security Advisory GHSA-jcxm-m3jx-f287 published
- 2026-04-13: disclosed: CVE-2026-28291 published to NVD

## References

- [https://github.com/steveukx/git-js/blob/789c13ebabcf18ebe0b3a0c88ebb4037dede42e3/simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts](https://github.com/steveukx/git-js/blob/789c13ebabcf18ebe0b3a0c88ebb4037dede42e3/simple-git/src/lib/plugins/block-unsafe-operations-plugin.ts)
- [https://github.com/steveukx/git-js/commit/1effd8e5012a5da05a9776512fac3e39b11f2d2d](https://github.com/steveukx/git-js/commit/1effd8e5012a5da05a9776512fac3e39b11f2d2d)
- [https://github.com/steveukx/git-js/releases/tag/simple-git%403.32.0](https://github.com/steveukx/git-js/releases/tag/simple-git%403.32.0)
- [https://github.com/steveukx/git-js/security/advisories/GHSA-jcxm-m3jx-f287](https://github.com/steveukx/git-js/security/advisories/GHSA-jcxm-m3jx-f287)
- [https://www.cve.org/CVERecord?id=CVE-2022-25860](https://www.cve.org/CVERecord?id=CVE-2022-25860)
- [https://access.redhat.com/security/cve/CVE-2026-28291](https://access.redhat.com/security/cve/CVE-2026-28291)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2457930](https://bugzilla.redhat.com/show_bug.cgi?id=2457930)

## Related threats

- [simple-git command injection via trailer configuration](https://junglewise.ai/threats/cve-2026-102828-simple-git-an-interface-for-running-git-commands-in-any-node-js)
- [simple-git command injection via abbreviated Git options](https://junglewise.ai/threats/cve-2026-102827-simple-git-an-interface-for-running-git-commands-in-any-node-js)
- [simple-git arbitrary command execution via Git configuration injection](https://junglewise.ai/threats/cve-2026-102826-simple-git-an-interface-for-running-git-commands-in-any-node-js)
- [steveukx simple-git Remote Code Execution via --config flag injection](https://junglewise.ai/threats/cve-2026-6951-steveukx-simple-git-remote-code-execution-via-config-flag)
- [steveukx simple-git remote code execution via case-sensitivity bypass](https://junglewise.ai/threats/cve-2026-28292-steveukx-simple-git-remote-code-execution-via-case-sensitivity)
