Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS1nNHJnLTk5M3ItbWd4N84AAqZr

Improper Neutralization of Special Elements used in a Command in Shell-quote

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.

Permalink: https://github.com/advisories/GHSA-g4rg-993r-mgx7
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS1nNHJnLTk5M3ItbWd4N84AAqZr
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: almost 2 years ago
Updated: 3 months ago


CVSS Score: 9.8
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Identifiers: GHSA-g4rg-993r-mgx7, CVE-2021-42740
References: Repository: https://github.com/ljharb/shell-quote
Blast Radius: 62.4

Affected Packages

npm:shell-quote
Dependent packages: 1,586
Dependent repositories: 2,355,456
Downloads: 76,686,473 last month
Affected Version Ranges: <= 1.7.2
Fixed in: 1.7.3
All affected versions: 0.0.0, 0.0.1, 0.1.0, 0.1.1, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.7.0, 1.7.1, 1.7.2
All unaffected versions: 1.7.3, 1.7.4, 1.8.0, 1.8.1