CVE-2021-26700: Vscode npm script Remote Code Execution Vulnerability
CRITICALCVE-2021-26700 is a CRITICAL remote code execution vulnerability (General Security Weakness) affecting Vscode npm script libraries in the npm ecosystem. The issue involves remote code execution in vscode-npm-script. Remediation is available in the latest vendor maintenance releases.
CVE-2021-26700 at a Glance
How to Fix CVE-2021-26700
To remediate this vulnerability, upgrade all affected Vscode npm script 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 vscode-npm-script@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls vscode-npm-script
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-26700, inspect your project dependencies using npm:
npm ls vscode-npm-script
Analyze the terminal output to locate any version of Vscode npm script in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls vscode-npm-script 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 General Security Weakness. In Vscode npm script, 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-26700 Affected Vscode npm script Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vscode-npm-script
|
npm |
≥ 0.0.0
|
|
References
Frequently Asked Questions
What is CVE-2021-26700?
Which Vscode npm script versions are affected?
What version fixes CVE-2021-26700?
Is vscode-npm-script affected?
What CWE is associated with CVE-2021-26700?
How can I check npm dependencies for CVE-2021-26700?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r84v-qff8-jv5g",
"modified" : "2022-07-20T01:27:19Z",
"published" : "2022-05-24T17:43:20Z",
"aliases" : [ "CVE-2021-26700" ],
"summary" : "Remote code execution in vscode-npm-script",
"details" : "Visual Studio Code npm-script Extension Remote Code Execution Vulnerability",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "vscode-npm-script"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-26700"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/microsoft/vscode-npm-scripts"
}, {
"type" : "WEB",
"url" : "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-26700"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-20T01:27:19Z",
"nvd_published_at" : "2021-02-25T23:15:00Z"
}
}