CVE-2021-3190
Description
The async-git package before 1.13.2 for Node.js allows OS command injection via shell metacharacters in git operations like reset and tag.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
The async-git package before 1.13.2 for Node.js allows OS command injection via shell metacharacters in git operations like reset and tag.
The vulnerability in the async-git package (versions before 1.13.2) stems from passing untrusted user input directly to git commands executed via a shell. This allows an attacker to inject arbitrary OS commands by including shell metacharacters in function arguments such as those for git.reset and git.tag.
The attack vector requires an attacker to control input that is passed to these git wrapper functions. No authentication is needed if the application exposes these functions to untrusted users. The injection occurs because the package used exec or similar methods that invoke a shell rather than using spawn with arguments, which prevents shell interpretation.
Successful exploitation allows an attacker to execute arbitrary commands on the host system with the privileges of the Node.js process. This could lead to full remote code execution, data exfiltration, or further compromise of the server.
A fix was implemented in version 1.13.2 by switching to spawn instead of a shell-based execution, as shown in pull request #14 [2]. Users should update the package immediately; no workaround is available besides updating.
## References 1. NVD - CVE-2021-3190 [1] 2. GitHub Pull Request #14 (fix) [2] 3. GitHub Pull Request #13 (test for vulnerability) [3] and its commit [4]
Citations
The analysis above cites references [1], [2], [3], and [4].
- NVD - CVE-2021-3190
- Use spawn with git to avoid shell script vulnerabilities by omrilotan · Pull Request #14 · omrilotan/async-git
- Add test for reported vulnerabilities by omrilotan · Pull Request #13 · omrilotan/async-git
- Add test for reported vulnerabilities by omrilotan · Pull Request #13 · omrilotan/async-git
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
async-gitnpm | < 1.13.2 | 1.13.2 |
Affected products
2- async-git/async-gitdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
8- github.com/advisories/GHSA-6c3f-p5wp-34mhghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-3190ghsaADVISORY
- advisory.checkmarx.net/advisory/CX-2021-4772ghsax_refsource_MISCWEB
- github.com/omrilotan/async-git/pull/13ghsax_refsource_MISCWEB
- github.com/omrilotan/async-git/pull/13/commits/611823bd97dd41e9e8127c38066868ff9dcfa57aghsax_refsource_MISCWEB
- github.com/omrilotan/async-git/pull/13/commits/a5f45f58941006c4cc1699609383b533d9b92c6aghsax_refsource_MISCWEB
- github.com/omrilotan/async-git/pull/14ghsax_refsource_CONFIRMWEB
- www.npmjs.com/package/async-gitghsaWEB
News mentions
0No linked articles in our index yet.