PHP2Shell: Read our blog on the critical RCE vulnerabilities affecting 70% of the Internet

CVE-2021-3190: 
JavaScript vulnerability analysis and mitigation

Overview

The async-git package before version 1.13.2 for Node.js contains a vulnerability (CVE-2021-3190) that allows OS Command Injection via shell metacharacters, specifically affecting the git.reset and git.tag functions. The vulnerability was discovered and disclosed in January 2021 (NVD).

Technical details

The vulnerability stems from improper neutralization of special elements used in OS commands, classified as CWE-78. The issue allows attackers to inject shell metacharacters through the git.reset and git.tag functions. The vulnerability has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (NVD).

Impact

If exploited, this vulnerability could allow an attacker to execute arbitrary OS commands through shell metacharacters when using the affected git.reset and git.tag functions. This could potentially lead to unauthorized command execution on the system running the vulnerable package (Checkmarx Advisory).

Exploitability

The vulnerability can be exploited by passing shell metacharacters to the git.reset and git.tag functions. Tests demonstrating the vulnerability show that commands like '; touch HACKED #' could be used to execute arbitrary commands (GitHub PR).

Mitigation and workarounds

The vulnerability was patched in version 1.13.2 of the async-git package. The fix involved sanitizing user input by using JSON.stringify for command arguments and later switching to spawn with git to avoid shell script vulnerabilities entirely (GitHub PR, GitHub PR).

Additional resources


Source: This report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-jr5w-w6x2-84p9HIGH7.4
  • JavaScript logoJavaScript
  • electron
NoYesOct 22, 2026
GHSA-v9q2-hcqj-ggqrMEDIUMN/A
  • JavaScript logoJavaScript
  • seamless-auth-api
NoYesOct 22, 2026
GHSA-v2q2-q246-8chmMEDIUMN/A
  • JavaScript logoJavaScript
  • seamless-auth-api
NoYesOct 22, 2026
GHSA-qx82-28gf-w744HIGHN/A
  • JavaScript logoJavaScript
  • seamless-auth-api
NoYesOct 22, 2026
GHSA-9xg2-j8fg-427cMEDIUMN/A
  • JavaScript logoJavaScript
  • seamless-auth-api
NoYesOct 22, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management