CVE-2021-42740: Command Injection
Node.js shell-quote module could allow a remote attacker to execute arbitrary commands on the system, caused by a flaw with windows drive letter regex. By sending a specially-crafted shell metacharacters, an attacker could exploit this vulnerability to execute arbitrary commands on the system.
Other sources
The shell-quote package before 1.7.3 for Node.js allows command injection. An attacker can inject unescaped shell metacharacters through a regex designed to support Windows drive letters. If the output of this package is passed to a real shell as a quoted argument to a command with exec(), an attacker can inject arbitrary commands. This is because the Windows drive letter regex character class is [A-z] instead of the correct [A-Za-z]. Several shell metacharacters exist in the space between capital letter Z and lower case letter a, such as the backtick character.
— GitHub
The shell-quote package before 1.7.3 for Node.js allows command injection. An attacker can inject unescaped shell metacharacters through a regex designed to support Windows drive letters. If the output of this package is passed to a real shell as a quoted argument to a command with exec(), an attacker can inject arbitrary commands. This is because the Windows drive letter regex character class is {A-z] instead of the correct {A-Za-z]. Several shell metacharacters exist in the space between capital letter Z and lower case letter a, such as the backtick character.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2021-42740?
CVE-2021-42740 is classified as a high severity vulnerability due to its potential for remote code execution.
How do I fix CVE-2021-42740?
To fix CVE-2021-42740, update the shell-quote module to version 1.7.3 or later.
What systems are affected by CVE-2021-42740?
CVE-2021-42740 affects the shell-quote module for Node.js and versions up to 1.7.2.
Can CVE-2021-42740 be exploited remotely?
Yes, CVE-2021-42740 can be exploited by a remote attacker to execute arbitrary commands on the system.
What is the impact of CVE-2021-42740?
The impact of CVE-2021-42740 includes the potential for arbitrary command execution on affected systems.