Vulnerabilities in pkg:npm/portprocesses

PACKAGE
Advisory Identifier: GHSA-vm67-7vmg-66vm
Advisory Summary

CVE-2021-23348 is a MODERATE (CVSS 6.4) arbitrary command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Portprocesses libraries in the npm ecosystem. The issue involves arbitrary command injection in portprocesses. Remediation is available by upgrading affected packages to version 1.0.5.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/portprocesses

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-vm67-7vmg-66vm CVE-2021-23348 MODERATE Arbitrary Command Injection in portprocesses

CVE-2021-23348 at a Glance

CVE Identifier CVE-2021-23348
GHSA Identifier GHSA-vm67-7vmg-66vm
Severity MODERATE
CVSS v3.1 Base Score 6.4
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Portprocesses
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.4

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2021-23348

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

portprocesses fixed: 1.0.5
npm install portprocesses@1.0.5
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 portprocesses

How to Check if You Are Affected

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

npm ls portprocesses

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

Note: The npm ls portprocesses 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Portprocesses, 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 An Arbitrary Command Injection vulnerability was reported in `portprocesses` impacting versions <= 1.0.4. ### Example (Proof of Concept) The following example demonstrates the vulnerability and will run `touch success` therefore creating a file named `success`. ```js const portprocesses = require("portprocesses"); portprocesses.killProcess("$(touch success)"); ```

CVE-2021-23348 Affected Portprocesses Versions

1 component(s)
Fixed Versions:
1.0.5
Product / Package Ecosystem Affected Versions Fixed Version
portprocesses
npm
< 1.0.5
1.0.5

References

Frequently Asked Questions

What is CVE-2021-23348?
CVE-2021-23348 is a security vulnerability in Portprocesses involving Arbitrary Command Injection in portprocesses under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Portprocesses versions are affected?
Affected versions include releases prior to 1.0.5 across affected packages: portprocesses.
What version fixes CVE-2021-23348?
Upgrading to 1.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is portprocesses affected?
Yes, portprocesses is affected in releases prior to 1.0.5. Upgrade your dependency to 1.0.5 or later.
What is the CVSS score of CVE-2021-23348?
CVE-2021-23348 has a CVSS v3.1 base score of 6.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2021-23348?
CVE-2021-23348 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2021-23348?
Run the dependency tree command: 'npm ls portprocesses'. 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-vm67-7vmg-66vm",
  "modified" : "2021-03-31T17:50:32Z",
  "published" : "2021-04-06T17:24:50Z",
  "aliases" : [ "CVE-2021-23348" ],
  "summary" : "Arbitrary Command Injection in portprocesses",
  "details" : "### Impact\n\nAn Arbitrary Command Injection vulnerability was reported in `portprocesses` impacting versions <= 1.0.4.\n\n### Example (Proof of Concept)\n\nThe following example demonstrates the vulnerability and will run `touch success` therefore creating a file named `success`.\n\n```js\nconst portprocesses = require(\"portprocesses\");\n\nportprocesses.killProcess(\"$(touch success)\");\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "portprocesses"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rrainn/PortProcesses/security/advisories/GHSA-vm67-7vmg-66vm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23348"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rrainn/PortProcesses/commit/86811216c9b97b01b5722f879f8c88a7aa4214e1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rrainn/PortProcesses/blob/fffceb09aff7180afbd0bd172e820404b33c8299/index.js%23L23"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-PORTPROCESSES-1078536"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77", "CWE-78" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-31T17:50:32Z",
    "nvd_published_at" : "2021-03-31T15:15:00Z"
  }
}