Vulnerabilities

3 via 4 paths

Dependencies

222

Source

GitHub

Commit

b9dba375

Find, fix and prevent vulnerabilities in your code.

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

high severity

Allocation of Resources Without Limits or Throttling

  • Vulnerable module: @fastify/multipart
  • Introduced through: @fastify/multipart@7.7.3

Detailed paths

  • Introduced through: team-metrics-dashaboard@jessicamann/team-metrics#b9dba37501dc6a0eaa78f8ce34a4217bc177a1be @fastify/multipart@7.7.3
    Remediation: Upgrade to @fastify/multipart@8.3.1.

Overview

@fastify/multipart is a Multipart plugin for Fastify

Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via the saveRequestFiles function. An attacker can cause the server to exhaust disk space by repeatedly uploading files and canceling the requests.

Remediation

Upgrade @fastify/multipart to version 8.3.1, 9.0.3 or higher.

References

medium severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: @fastify/static@6.12.0 and @fastify/multipart@7.7.3

Detailed paths

  • Introduced through: team-metrics-dashaboard@jessicamann/team-metrics#b9dba37501dc6a0eaa78f8ce34a4217bc177a1be @fastify/static@6.12.0 glob@8.1.0 inflight@1.0.6
  • Introduced through: team-metrics-dashaboard@jessicamann/team-metrics#b9dba37501dc6a0eaa78f8ce34a4217bc177a1be @fastify/multipart@7.7.3 @fastify/swagger-ui@1.10.2 @fastify/static@6.12.0 glob@8.1.0 inflight@1.0.6

Overview

Affected versions of this package are vulnerable to Missing Release of Resource after Effective Lifetime via the makeres function due to improperly deleting keys from the reqs object after execution of callbacks. This behavior causes the keys to remain in the reqs object, which leads to resource exhaustion.

Exploiting this vulnerability results in crashing the node process or in the application crash.

Note: This library is not maintained, and currently, there is no fix for this issue. To overcome this vulnerability, several dependent packages have eliminated the use of this library.

To trigger the memory leak, an attacker would need to have the ability to execute or influence the asynchronous operations that use the inflight module within the application. This typically requires access to the internal workings of the server or application, which is not commonly exposed to remote users. Therefore, “Attack vector” is marked as “Local”.

PoC

const inflight = require('inflight');

function testInflight() {
  let i = 0;
  function scheduleNext() {
    let key = `key-${i++}`;
    const callback = () => {
    };
    for (let j = 0; j < 1000000; j++) {
      inflight(key, callback);
    }

    setImmediate(scheduleNext);
  }


  if (i % 100 === 0) {
    console.log(process.memoryUsage());
  }

  scheduleNext();
}

testInflight();

Remediation

There is no fixed version for inflight.

References

medium severity

Information Exposure

  • Vulnerable module: @fastify/swagger-ui
  • Introduced through: @fastify/multipart@7.7.3

Detailed paths

  • Introduced through: team-metrics-dashaboard@jessicamann/team-metrics#b9dba37501dc6a0eaa78f8ce34a4217bc177a1be @fastify/multipart@7.7.3 @fastify/swagger-ui@1.10.2
    Remediation: Upgrade to @fastify/multipart@8.1.0.

Overview

@fastify/swagger-ui is a Serve Swagger-ui for Fastify

Affected versions of this package are vulnerable to Information Exposure due to the default configuration not setting the baseDir, which results in the exposure of all files in the module's directory via HTTP routes served by the module. An attacker can access sensitive information by navigating to these exposed routes.

Remediation

Upgrade @fastify/swagger-ui to version 2.1.0 or higher.

References