Vulnerabilities in pkg:npm/@scandipwa/magento-scripts

PACKAGE
Advisory Identifier: GHSA-52qp-gwwh-qrg4
Advisory Summary

CVE-2021-32684 is a MODERATE (CVSS 6.2) missing handler vulnerability (CWE-670: Always-Incorrect Control Flow Implementation) affecting @scandipwa/magento scripts libraries in the npm ecosystem. The issue involves missing handler in @scandipwa/magento-scripts. Remediation is available by upgrading affected packages to version 1.5.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@scandipwa/magento-scripts

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@scandipwa/magento-scripts. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-52qp-gwwh-qrg4 CVE-2021-32684 MODERATE Missing Handler in @scandipwa/magento-scripts

CVE-2021-32684 at a Glance

CVE Identifier CVE-2021-32684
GHSA Identifier GHSA-52qp-gwwh-qrg4
Severity MODERATE
CVSS v3.1 Base Score 6.2
CWE Classification CWE-670: Always-Incorrect Control Flow Implementation
Affected Product @scandipwa/magento scripts
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2021-32684

To remediate this vulnerability, upgrade all affected @scandipwa/magento scripts dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@scandipwa/magento-scripts fixed: 1.5.3
npm install @scandipwa/magento-scripts@1.5.3
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 @scandipwa/magento-scripts

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-32684, inspect your project dependencies using npm:

npm ls @scandipwa/magento-scripts

Analyze the terminal output to locate any version of @scandipwa/magento scripts in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.3), your application is affected.

Note: The npm ls @scandipwa/magento-scripts 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-670: Always-Incorrect Control Flow Implementation, where the code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated. In @scandipwa/magento scripts, 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

### Impact After changing the function from synchronous to asynchronous there wasn't implemented handler in the [start](https://docs.create-magento-app.com/getting-started/available-commands/start), [stop](https://docs.create-magento-app.com/getting-started/available-commands/stop), [exec](https://docs.create-magento-app.com/getting-started/available-commands/exec) and [logs](https://docs.create-magento-app.com/getting-started/available-commands/logs) commands, effectively making them unusable. ### Patches [Version 1.5.3](https://github.com/scandipwa/create-magento-app/releases/tag/%40scandipwa%2Fmagento-scripts%401.5.3) contains patches for the problems described above. ### Workarounds Upgrade to patched or latest (recommended) version `npm i @scandipwa/magento-scripts@1.5.3` or `npm i @scandipwa/magento-scripts@latest`. ### References New releases always available here: https://github.com/scandipwa/create-magento-app/releases ### For more information If you have any questions or comments about this advisory: * Open an issue in [create-magento-app](https://github.com/scandipwa/create-magento-app/issues)

CVE-2021-32684 Affected @scandipwa/magento scripts Versions

1 component(s)
Fixed Versions:
1.5.3
Product / Package Ecosystem Affected Versions Fixed Version
@scandipwa/magento-scripts
npm
≥ 1.5.1
< 1.5.3
1.5.3

References

Frequently Asked Questions

What is CVE-2021-32684?
CVE-2021-32684 is a security vulnerability in @scandipwa/magento scripts involving Missing Handler in @scandipwa/magento-scripts under CWE-670: Always-Incorrect Control Flow Implementation.
Which @scandipwa/magento scripts versions are affected?
Affected versions include releases prior to 1.5.3 across affected packages: @scandipwa/magento-scripts.
What version fixes CVE-2021-32684?
Upgrading to 1.5.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @scandipwa/magento-scripts affected?
Yes, @scandipwa/magento-scripts is affected in releases prior to 1.5.3. Upgrade your dependency to 1.5.3 or later.
What is the CVSS score of CVE-2021-32684?
CVE-2021-32684 has a CVSS v3.1 base score of 6.2 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-32684?
CVE-2021-32684 is classified under CWE-670: Always-Incorrect Control Flow Implementation (The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated.).
How can I check npm dependencies for CVE-2021-32684?
Run the dependency tree command: 'npm ls @scandipwa/magento-scripts'. 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-52qp-gwwh-qrg4",
  "modified" : "2021-06-16T20:15:07Z",
  "published" : "2021-06-21T17:10:02Z",
  "aliases" : [ "CVE-2021-32684" ],
  "summary" : "Missing Handler in @scandipwa/magento-scripts",
  "details" : "### Impact\nAfter changing the function from synchronous to asynchronous there wasn't implemented handler in the [start](https://docs.create-magento-app.com/getting-started/available-commands/start), [stop](https://docs.create-magento-app.com/getting-started/available-commands/stop), [exec](https://docs.create-magento-app.com/getting-started/available-commands/exec) and [logs](https://docs.create-magento-app.com/getting-started/available-commands/logs) commands, effectively making them unusable.\n\n### Patches\n[Version 1.5.3](https://github.com/scandipwa/create-magento-app/releases/tag/%40scandipwa%2Fmagento-scripts%401.5.3) contains patches for the problems described above.\n\n### Workarounds\nUpgrade to patched or latest (recommended) version `npm i @scandipwa/magento-scripts@1.5.3` or `npm i @scandipwa/magento-scripts@latest`.\n\n### References\nNew releases always available here: https://github.com/scandipwa/create-magento-app/releases\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [create-magento-app](https://github.com/scandipwa/create-magento-app/issues)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@scandipwa/magento-scripts"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.1"
      }, {
        "fixed" : "1.5.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/scandipwa/create-magento-app/security/advisories/GHSA-52qp-gwwh-qrg4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32684"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/scandipwa/create-magento-app/commit/89115db7031e181eb8fb4ec2822bc6cab88e7071"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-670" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-06-16T20:15:07Z",
    "nvd_published_at" : "2021-06-14T23:15:00Z"
  }
}