Vulnerabilities in pkg:npm/@zowe/imperative
PACKAGECVE-2021-4326 is a LOW (CVSS 3.3) imperative cli vulnerable to command vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting @zowe/imperative libraries in the npm ecosystem. The issue involves imperative cli vulnerable to command injection. Remediation is available by upgrading affected packages to version 5.7.1, 4.18.10.
pkg:npm/@zowe/imperative
Vulnerability advisories affecting package pkg:npm/@zowe/imperative. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-6q8m-42qq-64r7 | CVE-2021-4326 | LOW | Imperative CLI vulnerable to Command Injection |
CVE-2021-4326 at a Glance
Security Impact
CVSS: 3.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2021-4326
To remediate this vulnerability, upgrade all affected @zowe/imperative dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @zowe/imperative@5.7.1
npm install @zowe/imperative@4.18.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @zowe/imperative
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-4326, inspect your project dependencies using npm:
npm ls @zowe/imperative
Analyze the terminal output to locate any version of @zowe/imperative in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.7.1), your application is affected.
Note: The npm ls @zowe/imperative command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In @zowe/imperative, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-4326 Affected @zowe/imperative Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@zowe/imperative
|
npm |
≥ 5.0.0
< 5.7.1
|
5.7.1
|
|
@zowe/imperative
|
npm |
< 4.18.10
|
4.18.10
|
References
Frequently Asked Questions
What is CVE-2021-4326?
Which @zowe/imperative versions are affected?
What version fixes CVE-2021-4326?
Is @zowe/imperative affected?
What is the CVSS score of CVE-2021-4326?
What CWE is associated with CVE-2021-4326?
How can I check npm dependencies for CVE-2021-4326?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6q8m-42qq-64r7",
"modified" : "2023-03-02T17:16:46Z",
"published" : "2023-03-01T09:30:29Z",
"aliases" : [ "CVE-2021-4326" ],
"summary" : "Imperative CLI vulnerable to Command Injection",
"details" : "A vulnerability in Imperative framework which allows already-privileged local actors to execute arbitrary shell commands via plugin install/update commands, or maliciously formed environment variables. Impacts Zowe CLI.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@zowe/imperative"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.7.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@zowe/imperative"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.18.10"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-4326"
}, {
"type" : "WEB",
"url" : "https://github.com/zowe/imperative/pull/900"
}, {
"type" : "WEB",
"url" : "https://github.com/zowe/imperative/pull/902"
}, {
"type" : "WEB",
"url" : "https://github.com/zowe/imperative"
}, {
"type" : "WEB",
"url" : "https://github.com/zowe/imperative/commits/v4.18.10"
}, {
"type" : "WEB",
"url" : "https://github.com/zowe/imperative/commits/v5.7.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2023-03-01T22:57:51Z",
"nvd_published_at" : "2023-03-01T08:15:00Z"
}
}