CVE-2022-24376: OS Command Injection in git-promise
Summary
CVE-2022-24376: OS Command Injection in git-promise. Affects git-promise versions < 1.0.0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The git-promise package is an npm package that provides a promise-based interface for executing Git commands. It allows developers to interact with Git repositories programmatically. The package is widely used in various projects and applications.
Vulnerability Detail
The git-promise package is vulnerable to OS Command Injection due to an inappropriate fix of a prior vulnerability. This vulnerability allows an attacker to execute arbitrary commands on the host system by injecting malicious input into the Git commands executed by the package. The vulnerability has a CVSS score of 7.2, indicating a high severity level. It can lead to unauthorized access, data leakage, and potential compromise of the host system.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As there is no fix available for the vulnerability, it is crucial to take precautionary measures to mitigate the risk. One possible workaround is to carefully validate and sanitize any user input before passing it to the git-promise package. This can help prevent command injection attacks by ensuring that only safe and expected input is used in Git commands.
Conclusion
The git-promise package is vulnerable to OS Command Injection, and unfortunately, there is no fix available for this vulnerability. It is crucial to take precautionary measures, such as validating and sanitizing user input, to mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.
See every vulnerability recorded for git-promise →
FAQ
The vulnerability allows an attacker to execute arbitrary commands on the host system, potentially leading to unauthorized access, data leakage, and compromise of the system.
No, the vulnerability in the git-promise package will not be fixed. The package's README file has been updated with a warning regarding this issue.
Yes, all versions of the git-promise package are affected by this vulnerability.
It is recommended to find an alternative package or implement a custom solution that does not rely on git-promise. Additionally, ensure that any user input is properly validated and sanitized to mitigate the risk of command injection attacks.
You can find more information about this vulnerability in the advisory published on the GitHub Security Advisory Database: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/06/GHSA-chj3-f7xw-367m/GHSA-chj3-f7xw-367m.json