Vulnerabilities

3 via 5 paths

Dependencies

339

Source

npm

Find, fix and prevent vulnerabilities in your code.

Severity
  • 2
  • 1
Status
  • 3
  • 0
  • 0

high severity

Denial of Service (DoS)

  • Vulnerable module: engine.io
  • Introduced through: smartsocket@1.1.22

Detailed paths

  • Introduced through: @shipzone/npmci@3.0.48 smartsocket@1.1.22 socket.io@2.4.1 engine.io@3.5.0

Overview

engine.io is a realtime engine behind Socket.IO. It provides the foundation of a bidirectional connection between client and server

Affected versions of this package are vulnerable to Denial of Service (DoS) via a POST request to the long polling transport.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade engine.io to version 4.0.0 or higher.

References

high severity
new

Improper Privilege Management

  • Vulnerable module: shelljs
  • Introduced through: smartshell@1.0.19 and smartssh@1.2.2

Detailed paths

  • Introduced through: @shipzone/npmci@3.0.48 smartshell@1.0.19 shelljs@0.7.8
  • Introduced through: @shipzone/npmci@3.0.48 smartssh@1.2.2 shelljs@0.7.8

Overview

shelljs is a wrapper for the Unix shell commands for Node.js.

Affected versions of this package are vulnerable to Improper Privilege Management. When ShellJS is used to create shell scripts which may be running as root, users with low-level privileges on the system can leak sensitive information such as passwords (depending on implementation) from the standard output of the privileged process OR shutdown privileged ShellJS processes via the exec function when triggering EACCESS errors.

Note: Thi only impacts the synchronous version of shell.exec().

Remediation

Upgrade shelljs to version 0.8.5 or higher.

References

medium severity
new

Information Exposure

  • Vulnerable module: nanoid
  • Introduced through: smartsocket@1.1.22

Detailed paths

  • Introduced through: @shipzone/npmci@3.0.48 smartsocket@1.1.22 shortid@2.2.16 nanoid@2.1.11
  • Introduced through: @shipzone/npmci@3.0.48 smartsocket@1.1.22 @pushrocks/lik@3.0.19 @pushrocks/smartunique@3.0.3 shortid@2.2.16 nanoid@2.1.11

Overview

Affected versions of this package are vulnerable to Information Exposure via the valueOf() function which allows to reproduce the last id generated.

PoC

import { nanoid } from 'nanoid';

const makeProxyNumberToReproducePreviousID = () => {
  let step = 0;
  return {
    valueOf() {
      // // if (!pool || pool.length < bytes) {
      if (step === 0) {
        step++;
        return 0;
      }

      // } else if (poolOffset + bytes > pool.length) {
      if (step === 1) {
        step++;
        return -Infinity;
      }

      // poolOffset += bytes
      if (step === 2) {
        step++;
        return 0;
      }

      return 21;
    },
  };
};

const ID1 = nanoid();
const ID2 = nanoid(makeProxyNumberToReproducePreviousID());
console.log({ ID1, ID2, isIDsEqual: ID1 === ID2 });

Remediation

Upgrade nanoid to version 3.1.31 or higher.

References