Vulnerabilities in pkg:npm/vscode-npm-script

PACKAGE
Advisory Identifier: GHSA-r84v-qff8-jv5g
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/vscode-npm-script

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/vscode-npm-script. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-r84v-qff8-jv5g CVE-2021-26700 CRITICAL Remote code execution in vscode-npm-script

CVE-2021-26700 at a Glance

CVE Identifier CVE-2021-26700
GHSA Identifier GHSA-r84v-qff8-jv5g
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Vscode npm script
Package Ecosystem npm
Published Date
Last Updated

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.

vscode-npm-script fixed: Latest secure release
npm install vscode-npm-script@Latest secure release
Verify Direct and Transitive Dependencies

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

Visual Studio Code npm-script Extension Remote Code Execution Vulnerability

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?
CVE-2021-26700 is a security vulnerability in Vscode npm script involving Remote code execution in vscode-npm-script under General Security Weakness.
Which Vscode npm script versions are affected?
Affected versions include releases prior to current release patches across affected packages: vscode-npm-script.
What version fixes CVE-2021-26700?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is vscode-npm-script affected?
Yes, vscode-npm-script is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2021-26700?
CVE-2021-26700 is classified under General Security Weakness.
How can I check npm dependencies for CVE-2021-26700?
Run the dependency tree command: 'npm ls vscode-npm-script'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}