Vulnerabilities

9 via 11 paths

Dependencies

398

Source

GitHub

Commit

29ec40a2

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
  • 5
  • 3
Status
  • 9
  • 0
  • 0

critical severity

Uncaught Exception

  • Vulnerable module: multer
  • Introduced through: multer@1.4.5-lts.2

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 multer@1.4.5-lts.2
    Remediation: Upgrade to multer@2.0.1.

Overview

Affected versions of this package are vulnerable to Uncaught Exception in makeMiddleware, when processing a file upload request. An attacker can cause the application to crash by sending a request with a field name containing an empty string.

Remediation

Upgrade multer to version 2.0.1 or higher.

References

high severity

Missing Release of Memory after Effective Lifetime

  • Vulnerable module: multer
  • Introduced through: multer@1.4.5-lts.2

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 multer@1.4.5-lts.2
    Remediation: Upgrade to multer@2.0.0.

Overview

Affected versions of this package are vulnerable to Missing Release of Memory after Effective Lifetime due to improper handling of error events in HTTP request streams, which fails to close the internal busboy stream. An attacker can cause a denial of service by repeatedly triggering errors in file upload streams, leading to resource exhaustion and memory leaks.

Note:

This is only exploitable if the server is handling file uploads.

Remediation

Upgrade multer to version 2.0.0 or higher.

References

high severity

Uncaught Exception

  • Vulnerable module: multer
  • Introduced through: multer@1.4.5-lts.2

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 multer@1.4.5-lts.2
    Remediation: Upgrade to multer@2.0.0.

Overview

Affected versions of this package are vulnerable to Uncaught Exception due to an error event thrown by busboy. An attacker can cause a full nodejs application to crash by sending a specially crafted multi-part upload request.

PoC

const express = require('express')
const multer  = require('multer')
const http  = require('http')
const upload = multer({ dest: 'uploads/' })
const port = 8888

const app = express()

app.post('/upload', upload.single('file'), function (req, res) {
  res.send({})
})

app.listen(port, () => {
  console.log(`Listening on port ${port}`)

  const boundary = 'AaB03x'
  const body = [
    '--' + boundary,
    'Content-Disposition: form-data; name="file"; filename="test.txt"',
    'Content-Type: text/plain',
    '',
    'test without end boundary'
  ].join('\r\n')
  const options = {
    hostname: 'localhost',
    port,
    path: '/upload',
    method: 'POST',
    headers: {
      'content-type': 'multipart/form-data; boundary=' + boundary,
      'content-length': body.length,
    }
  }
  const req = http.request(options, (res) => {
    console.log(res.statusCode)
  })
  req.on('error', (err) => {
    console.error(err)
  })
  req.write(body)
  req.end()
})

Remediation

Upgrade multer to version 2.0.0 or higher.

References

high severity

Uncaught Exception

  • Vulnerable module: multer
  • Introduced through: multer@1.4.5-lts.2

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 multer@1.4.5-lts.2
    Remediation: Upgrade to multer@2.0.2.

Overview

Affected versions of this package are vulnerable to Uncaught Exception due to improper handling of multipart requests. An attacker can cause the application to crash by sending a specially crafted malformed multi-part upload request that triggers an unhandled exception.

Remediation

Upgrade multer to version 2.0.2 or higher.

References

high severity
new

Server-side Request Forgery (SSRF)

  • Vulnerable module: ip
  • Introduced through: node-ssdp@4.0.1

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 node-ssdp@4.0.1 ip@1.1.9

Overview

ip is a Node library.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the ip.isPublic() and ip.isPrivate() functions. An attacker can interact with internal network resources by supplying specially crafted IP address such as octal localhost format ("017700000001") that is incorrectly identified as public.

Note:

This issue exists because of an incomplete fix for CVE-2024-29415.

PoC

Test octal localhost bypass:

node -e "const ip=require('ip'); console.log('017700000001 bypass:', ip.isPublic('017700000001'));" - returns true

Remediation

There is no fixed version for ip.

References

high severity
new

Server-side Request Forgery (SSRF)

  • Vulnerable module: ip
  • Introduced through: node-ssdp@4.0.1

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 node-ssdp@4.0.1 ip@1.1.9

Overview

ip is a Node library.

Affected versions of this package are vulnerable to Server-side Request Forgery (SSRF) via the ip.isPublic() and ip.isPrivate() functions. An attacker can interact with internal network resources by supplying specially crafted IP address such as null route ("0") that is being incorrectly identified as public.

Note: This issue exists because of an incomplete fix for CVE-2024-29415.

Exploit is only possible if the application and operating system interpret connection attempts to 0 or 0.0.0.0 as connections to 127.0.0.1.

PoC

Test null route bypass:

node -e "const ip=require('ip'); console.log('0 bypass:', ip.isPublic('0'));" - returns true

Remediation

There is no fixed version for ip.

References

medium severity

Symlink Attack

  • Vulnerable module: tmp
  • Introduced through: eslint-config-promise@2.0.2

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 eslint-config-promise@2.0.2 eslint@5.16.0 inquirer@6.5.2 external-editor@3.1.0 tmp@0.0.33

Overview

Affected versions of this package are vulnerable to Symlink Attack via the dir parameter. An attacker can cause files or directories to be written to arbitrary locations by supplying a crafted symbolic link that resolves outside the intended temporary directory.

PoC

const tmp = require('tmp');

const tmpobj = tmp.fileSync({ 'dir': 'evil-dir'});
console.log('File: ', tmpobj.name);

try {
    tmp.fileSync({ 'dir': 'mydir1'});
} catch (err) {
    console.log('test 1:', err.message)
}

try {
    tmp.fileSync({ 'dir': '/foo'});
} catch (err) {
    console.log('test 2:', err.message)
}

try {
    const fs = require('node:fs');
    const resolved = fs.realpathSync('/tmp/evil-dir');
    tmp.fileSync({ 'dir': resolved});
} catch (err) {
    console.log('test 3:', err.message)
}

Remediation

Upgrade tmp to version 0.2.4 or higher.

References

medium severity

Server-Side Request Forgery (SSRF)

  • Vulnerable module: ip
  • Introduced through: node-ssdp@4.0.1

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 node-ssdp@4.0.1 ip@1.1.9

Overview

ip is a Node library.

Affected versions of this package are vulnerable to Server-Side Request Forgery (SSRF) via the isPublic function, which identifies some private IP addresses as public addresses due to improper parsing of the input. An attacker can manipulate a system that uses isLoopback(), isPrivate() and isPublic functions to guard outgoing network requests to treat certain IP addresses as globally routable by supplying specially crafted IP addresses.

Note

This vulnerability derived from an incomplete fix for CVE-2023-42282

Remediation

There is no fixed version for ip.

References

medium severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: eslint-config-promise@2.0.2 and mqtt@4.3.8

Detailed paths

  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 eslint-config-promise@2.0.2 eslint@5.16.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 mqtt@4.3.8 help-me@3.0.0 glob@7.2.3 inflight@1.0.6
  • Introduced through: nodejs-poolcontroller@tagyoureit/nodejs-poolcontroller#29ec40a22aca23370365bcd1a594f32f99d5a046 eslint-config-promise@2.0.2 eslint@5.16.0 file-entry-cache@5.0.1 flat-cache@2.0.1 rimraf@2.6.3 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