Vulnerabilities

2 via 2 paths

Dependencies

53

Source

GitHub

Commit

e12a2cec

Find, fix and prevent vulnerabilities in your code.

Severity
  • 2
Status
  • 2
  • 0
  • 0

medium severity

Symlink Attack

  • Vulnerable module: tmp
  • Introduced through: inquirer@6.5.2

Detailed paths

  • Introduced through: blinktrade@blinktrade/blinktradejs#e12a2cec6f4b9ede7799b702b1fc6a87f440e981 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: ip@1.1.9

Detailed paths

  • Introduced through: blinktrade@blinktrade/blinktradejs#e12a2cec6f4b9ede7799b702b1fc6a87f440e981 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