CVE-2026-28291: Command Execution via Option-Parsing Bypass in simple-git
Vulnerability ID: CVE-2026-28291
CVSS Score: 8.1
Published: 2026-04-13
CVE-2026-28291 is a high-severity OS command injection vulnerability in the simple-git (git-js) library, resulting from an incomplete remediation of CVE-2022-25860. The vulnerability allows attackers to bypass regex-based security filters using Git's short-option bundling, leading to arbitrary command execution on the host system.
TL;DR
A flaw in simple-git < 3.32.0 allows arbitrary code execution via Git short-option bundling (e.g., -vu), bypassing regex-based security filters designed to block dangerous options like -u.
⚠️ Exploit Status: POC
Technical Details
- CWE ID: CWE-78
- Attack Vector: Network
- CVSS Score: 8.1
- Impact: High (Remote Code Execution)
- Exploit Status: Proof of Concept
- CISA KEV: False
Affected Systems
- Node.js applications utilizing the simple-git library
- CI/CD pipelines and deployment scripts relying on git-js for repository management
-
git-js (simple-git): < 3.32.0 (Fixed in:
3.32.0)
Code Analysis
Commit: 789c13e
Preliminary analysis of bypasses and potential fixes in block-unsafe-operations-plugin.ts
Mitigation Strategies
- Upgrade the simple-git package to version 3.32.0 or later.
- Implement strict input validation using allowlists for any user-supplied data interacting with simple-git.
- Reject any user-supplied string beginning with a hyphen before it reaches the simple-git argument array.
- Require explicit opt-in via the allowUnsafePack configuration if dangerous options are strictly necessary.
Remediation Steps:
- Identify all projects depending on the simple-git library using dependency scanning tools.
- Update the package.json to require simple-git version 3.32.0 or higher.
- Run npm install or yarn install to lock the updated dependency.
- Audit application source code to ensure user input is strictly validated before being passed to library methods like clone, fetch, or push.
- Deploy the updated application to staging environments, verify functionality, and promote to production.
References
- Official Advisory
- Vulnerable Code Location
- Release Notes (3.32.0)
- CVE Record (CVE-2026-28291)
- Related Vulnerability (CVE-2022-25860)
Read the full report for CVE-2026-28291 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)