@hoodie/account-server@5.1.3

Vulnerabilities

3 via 6 paths

Dependencies

162

Source

npm

Find, fix and prevent vulnerabilities in your code.

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

high severity

Uninitialized Memory Exposure

  • Vulnerable module: base64url
  • Introduced through: base64url@2.0.0 and pouchdb-admins@1.0.6

Detailed paths

  • Introduced through: @hoodie/account-server@5.1.3 base64url@2.0.0
    Remediation: Upgrade to base64url@3.0.0.
  • Introduced through: @hoodie/account-server@5.1.3 pouchdb-admins@1.0.6 base64url@2.0.0

Overview

base64url Converting to, and from, base64url.

Affected versions of this package are vulnerable to Uninitialized Memory Exposure. An attacker could extract sensitive data from uninitialized memory or may cause a Denial of Service (DoS) by passing in a large number, in setups where typed user input can be passed (e.g. from JSON).

Details

The Buffer class on Node.js is a mutable array of binary data, and can be initialized with a string, array or number.

const buf1 = new Buffer([1,2,3]);
// creates a buffer containing [01, 02, 03]
const buf2 = new Buffer('test');
// creates a buffer containing ASCII bytes [74, 65, 73, 74]
const buf3 = new Buffer(10);
// creates a buffer of length 10

The first two variants simply create a binary representation of the value it received. The last one, however, pre-allocates a buffer of the specified size, making it a useful buffer, especially when reading data from a stream. When using the number constructor of Buffer, it will allocate the memory, but will not fill it with zeros. Instead, the allocated buffer will hold whatever was in memory at the time. If the buffer is not zeroed by using buf.fill(0), it may leak sensitive information like keys, source code, and system info.

Remediation

Upgrade base64url to version 3.0.0 or higher. Note This is vulnerable only for Node <=4

References

high severity

Command Injection

  • Vulnerable module: nodemailer
  • Introduced through: nodemailer@2.7.2

Detailed paths

  • Introduced through: @hoodie/account-server@5.1.3 nodemailer@2.7.2
    Remediation: Upgrade to nodemailer@6.4.16.

Overview

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

Affected versions of this package are vulnerable to Command Injection. Use of crafted recipient email addresses may result in arbitrary command flag injection in sendmail transport for sending mails.

PoC

-bi@example.com (-bi Initialize the alias database.)
-d0.1a@example.com (The option -d0.1 prints the version of sendmail and the options it was compiled with.)
-Dfilename@example.com (Debug output ffile)

Remediation

Upgrade nodemailer to version 6.4.16 or higher.

References

low severity
new

Arbitrary Code Injection

  • Vulnerable module: underscore
  • Introduced through: nodemailer@2.7.2

Detailed paths

  • Introduced through: @hoodie/account-server@5.1.3 nodemailer@2.7.2 nodemailer-direct-transport@3.3.2 smtp-connection@2.12.0 httpntlm@1.6.1 underscore@1.7.0
  • Introduced through: @hoodie/account-server@5.1.3 nodemailer@2.7.2 nodemailer-smtp-pool@2.8.2 smtp-connection@2.12.0 httpntlm@1.6.1 underscore@1.7.0
  • Introduced through: @hoodie/account-server@5.1.3 nodemailer@2.7.2 nodemailer-smtp-transport@2.7.2 smtp-connection@2.12.0 httpntlm@1.6.1 underscore@1.7.0

Overview

underscore is a JavaScript's functional programming helper library.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the template function, particularly when the variable option is taken from _.templateSettings as it is not sanitized.

PoC

const _ = require('underscore');
_.templateSettings.variable = "a = this.process.mainModule.require('child_process').execSync('touch HELLO')";
const t = _.template("")();

Remediation

Upgrade underscore to version 1.13.0-2, 1.12.1 or higher.

References