REDHAT-BUG-2457930: High severity npm/simple-git vulnerability
simple-git enables running native Git commands from JavaScript. Versions up to and including 3.31.1 allow execution of arbitrary commands through Git option manipulation, bypassing safety checks meant to block dangerous options like -u and --upload-pack. The flaw stems from an incomplete fix for CVE-2022-25860, as Git's flexible option parsing allows numerous character combinations (e.g., -vu, -4u, -nu) to circumvent the regular-expression-based blocklist in the unsafe operations plugin. Due to the virtually infinite number of valid option variants that Git accepts, a complete blocklist-based mitigation may be infeasible without fully emulating Git's option parsing behavior. This issue has been fixed in version 3.32.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
simple-gitto a version that resolves this vulnerability.Fixed in 3.32.0 - Compensating control
For versions up to and including 3.31.1, prevent exploitation of CVE-2022-25860 by blocking/controlling use of native Git option manipulation patterns that can bypass the unsafe operations plugin safeguards (e.g., options that include combinations like -u / -vu / -4u / -nu) when invoking Git via simple-git.
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2457930?
The severity of REDHAT-BUG-2457930 is rated as high with a score of 7.
What vulnerabilities does REDHAT-BUG-2457930 address?
REDHAT-BUG-2457930 addresses a flaw in the simple-git package that allows for the execution of arbitrary commands due to Git option manipulation.
How do I fix REDHAT-BUG-2457930?
To fix REDHAT-BUG-2457930, upgrade the simple-git package to a version higher than 3.31.1 that contains the necessary patches.
What software is affected by REDHAT-BUG-2457930?
The affected software associated with REDHAT-BUG-2457930 is npm/simple-git.
What causes the issue described in REDHAT-BUG-2457930?
The issue in REDHAT-BUG-2457930 is caused by an incomplete fix for a previous vulnerability that fails to block dangerous Git options.