Vulnerabilities

12 via 14 paths

Dependencies

574

Source

GitHub

Commit

e14a0ac7

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
  • 4
  • 7
Status
  • 12
  • 0
  • 0

critical severity

Uncaught Exception

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

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 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: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 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: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 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: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 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

Improper Input Validation

  • Vulnerable module: url-parse
  • Introduced through: amqp-client-node@1.0.11

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 amqp-client-node@1.0.11 amqplib@0.5.6 url-parse@1.4.7

Overview

url-parse is a Small footprint URL parser that works seamlessly across Node.js and browser environments.

Affected versions of this package are vulnerable to Improper Input Validation due to improper fix of CVE-2020-8124 , it is possible to be exploited via the \b (backspace) character.

PoC:

const parse = require('./index.js')

url = parse('\bhttp://google.com')

console.log(url)

Output:

{
  slashes: false,
  protocol: '',
  hash: '',
  query: '',
  pathname: '\bhttp://google.com',
  auth: '',
  host: '',
  port: '',
  hostname: '',
  password: '',
  username: '',
  origin: 'null',
  href: '\bhttp://google.com'
}

Remediation

Upgrade url-parse to version 1.5.9 or higher.

References

medium severity
new

Interpretation Conflict

  • Vulnerable module: nodemailer
  • Introduced through: nodemailer@6.10.1 and email-templates@10.0.1

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 nodemailer@6.10.1
    Remediation: Upgrade to nodemailer@7.0.7.
  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 email-templates@10.0.1 nodemailer@6.10.1
  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 email-templates@10.0.1 preview-email@3.1.0 nodemailer@6.10.1

Overview

nodemailer is an Easy as cake e-mail sending from your Node.js applications

Affected versions of this package are vulnerable to Interpretation Conflict due to improper handling of quoted local-parts containing @. An attacker can cause emails to be sent to unintended external recipients or bypass domain-based access controls by crafting specially formatted email addresses with quoted local-parts containing the @ character.

Remediation

Upgrade nodemailer to version 7.0.7 or higher.

References

medium severity

Access Restriction Bypass

  • Vulnerable module: url-parse
  • Introduced through: amqp-client-node@1.0.11

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 amqp-client-node@1.0.11 amqplib@0.5.6 url-parse@1.4.7

Overview

url-parse is a Small footprint URL parser that works seamlessly across Node.js and browser environments.

Affected versions of this package are vulnerable to Access Restriction Bypass due to improper parsing process, that may lead to incorrect handling of authentication credentials and hostname, which allows bypass of hostname validation.

PoC:

// PoC.js
 var parse = require('url-parse')
var cc=parse("http://admin:password123@@127.0.0.1")

//Output:
{ slashes: true,
  protocol: 'http:',
  hash: '',
  query: '',
  pathname: '/',
  auth: 'admin:password123',
  host: '@127.0.0.1',
  port: '',
  hostname: '@127.0.0.1',
  password: 'password123',
  username: 'admin',
  origin: 'http://@127.0.0.1',
  href: 'http://admin:password123@@127.0.0.1/' }

Remediation

Upgrade url-parse to version 1.5.6 or higher.

References

medium severity

Authorization Bypass

  • Vulnerable module: url-parse
  • Introduced through: amqp-client-node@1.0.11

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 amqp-client-node@1.0.11 amqplib@0.5.6 url-parse@1.4.7

Overview

url-parse is a Small footprint URL parser that works seamlessly across Node.js and browser environments.

Affected versions of this package are vulnerable to Authorization Bypass via the hostname field of a parsed URL, because "url-parse" is unable to find the correct hostname when no port number is provided in the URL.

PoC:

var Url = require('url-parse');
var PAYLOAD = "http://example.com:";

console.log(Url(PAYLOAD));

// Expected hostname: example.com
// Actual hostname by url-parse: example.com:

Output:

{
  slashes: true,
  protocol: 'http:',
  hash: '',
  query: '',
  pathname: '/',
  auth: '',
  host: 'example.com:',
  port: '',
  hostname: 'example.com:',
  password: '',
  username: '',
  origin: 'http://example.com:',
  href: 'http://example.com:/'
}

Remediation

Upgrade url-parse to version 1.5.8 or higher.

References

medium severity

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: firebase-admin@11.11.1

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 firebase-admin@11.11.1 @google-cloud/firestore@6.8.0 google-gax@3.6.1 protobufjs-cli@1.1.1 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

Authorization Bypass Through User-Controlled Key

  • Vulnerable module: url-parse
  • Introduced through: amqp-client-node@1.0.11

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 amqp-client-node@1.0.11 amqplib@0.5.6 url-parse@1.4.7

Overview

url-parse is a Small footprint URL parser that works seamlessly across Node.js and browser environments.

Affected versions of this package are vulnerable to Authorization Bypass Through User-Controlled Key due to incorrect conversion of @ in the protocol field of the HREF.

PoC:

parse = require('url-parse')

console.log(parse("http:@/127.0.0.1"))

Output:

{
  slashes: true,
  protocol: 'http:',
  hash: '',
  query: '',
  pathname: '/127.0.0.1',
  auth: '',
  host: '',
  port: '',
  hostname: '',
  password: '',
  username: '',
  origin: 'null',
  href: 'http:///127.0.0.1'
}

Remediation

Upgrade url-parse to version 1.5.7 or higher.

References

medium severity

Improper Input Validation

  • Vulnerable module: url-parse
  • Introduced through: amqp-client-node@1.0.11

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 amqp-client-node@1.0.11 amqplib@0.5.6 url-parse@1.4.7

Overview

url-parse is a Small footprint URL parser that works seamlessly across Node.js and browser environments.

Affected versions of this package are vulnerable to Improper Input Validation. It mishandles certain uses of backslash such as http:\/ and interprets the URI as a relative path.

Remediation

Upgrade url-parse to version 1.5.0 or higher.

References

medium severity

Open Redirect

  • Vulnerable module: url-parse
  • Introduced through: amqp-client-node@1.0.11

Detailed paths

  • Introduced through: notification@haniot/notification#e14a0ac794f1e9533b8a6bca62cf334a58e37db8 amqp-client-node@1.0.11 amqplib@0.5.6 url-parse@1.4.7

Overview

url-parse is a Small footprint URL parser that works seamlessly across Node.js and browser environments.

Affected versions of this package are vulnerable to Open Redirect due to improper escaping of slash characters.

Remediation

Upgrade url-parse to version 1.5.2 or higher.

References