Vulnerabilities

9 via 9 paths

Dependencies

72

Source

GitHub

Find, fix and prevent vulnerabilities in your code.

Severity
  • 3
  • 6
Status
  • 9
  • 0
  • 0

high severity

Directory Traversal

  • Vulnerable module: tmp
  • Introduced through: tmp-promise@2.1.1

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › tmp-promise@2.1.1 › tmp@0.1.0
    Remediation: Upgrade to tmp-promise@3.0.0.

Overview

Affected versions of this package are vulnerable to Directory Traversal via unsanitized input in the prefix, postfix, or dir parameters during path construction. An attacker can create files outside the intended temporary directory, potentially overwriting or placing files in sensitive locations, by supplying crafted values containing traversal sequences or absolute paths.

Note:

The fix for this issue was incomplete and led to a bypass, known as CVE-2026-49982. Users are recommended to upgrade to version 0.2.7 to get a complete fix for this issue.

Details

A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.

Directory Traversal vulnerabilities can be generally divided into two types:

  • Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.

st is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public route.

If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.

curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa

Note %2e is the URL encoded version of . (dot).

  • Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as Zip-Slip.

One way to achieve this is by using a malicious zip archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.

The following is an example of a zip archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/ overwriting the authorized_keys file:

2018-04-15 22:04:29 .....           19           19  good.txt
2018-04-15 22:04:42 .....           20           20  ../../../../../../root/.ssh/authorized_keys

Remediation

Upgrade tmp to version 0.2.6 or higher.

References

high severity

Directory Traversal

  • Vulnerable module: tmp
  • Introduced through: tmp-promise@2.1.1

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › tmp-promise@2.1.1 › tmp@0.1.0
    Remediation: Upgrade to tmp-promise@3.0.0.

Overview

Affected versions of this package are vulnerable to Directory Traversal due to the improper sanitization of non-string values in the prefix, postfix, or dir parameters during path construction. An attacker can create files outside the intended temporary directory, potentially overwriting or placing files in sensitive locations, by supplying crafted values containing traversal sequences or absolute paths.

Note:

This issue is due to an incomplete fix for CVE-2026-44705. Added _assertPath as a guard does not account for non-string values.

Details

A Directory Traversal attack (also known as path traversal) aims to access files and directories that are stored outside the intended folder. By manipulating files with "dot-dot-slash (../)" sequences and its variations, or by using absolute file paths, it may be possible to access arbitrary files and directories stored on file system, including application source code, configuration, and other critical system files.

Directory Traversal vulnerabilities can be generally divided into two types:

  • Information Disclosure: Allows the attacker to gain information about the folder structure or read the contents of sensitive files on the system.

st is a module for serving static files on web pages, and contains a vulnerability of this type. In our example, we will serve files from the public route.

If an attacker requests the following URL from our server, it will in turn leak the sensitive private key of the root user.

curl http://localhost:8080/public/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/root/.ssh/id_rsa

Note %2e is the URL encoded version of . (dot).

  • Writing arbitrary files: Allows the attacker to create or replace existing files. This type of vulnerability is also known as Zip-Slip.

One way to achieve this is by using a malicious zip archive that holds path traversal filenames. When each filename in the zip archive gets concatenated to the target extraction folder, without validation, the final path ends up outside of the target folder. If an executable or a configuration file is overwritten with a file containing malicious code, the problem can turn into an arbitrary code execution issue quite easily.

The following is an example of a zip archive with one benign file and one malicious file. Extracting the malicious file will result in traversing out of the target folder, ending up in /root/.ssh/ overwriting the authorized_keys file:

2018-04-15 22:04:29 .....           19           19  good.txt
2018-04-15 22:04:42 .....           20           20  ../../../../../../root/.ssh/authorized_keys

Remediation

Upgrade tmp to version 0.2.7 or higher.

References

high severity

Infinite loop

  • Vulnerable module: uri-js
  • Introduced through: electron-store@5.2.0

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › electron-store@5.2.0 › conf@6.2.4 › ajv@6.15.0 › uri-js@4.4.1

Overview

uri-js is a RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.

Affected versions of this package are vulnerable to Infinite loop via the removeDotSegments function, which loops infinitely when a path segment begins with Unicode line separators (U+2028) or paragraph separators (U+2029). An attacker can trigger this by passing such a path to removeDotSegments directly, or through the normalize or resolve functions with IRI handling enabled, blocking the Node.js event loop indefinitely until heap exhaustion.

Remediation

There is no fixed version for uri-js.

References

medium severity
new

Asymmetric Resource Consumption (Amplification)

  • Vulnerable module: minimatch
  • Introduced through: tmp-promise@2.1.1

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › tmp-promise@2.1.1 › tmp@0.1.0 › rimraf@2.7.1 › glob@7.2.3 › minimatch@3.1.5
    Remediation: Upgrade to tmp-promise@3.0.0.

Overview

minimatch is a minimal matching utility.

Affected versions of this package are vulnerable to Asymmetric Resource Consumption (Amplification) in the firstPhasePreProcess method, where the **/.. transform clones a globParts entry and pushes the clone back onto the same array inside a do...while (didSomething) fixpoint loop. An attacker can exhaust CPU and memory by supplying a glob pattern whose **/.. sequences regenerate entries during preprocessing, which secondPhasePreProcess then compares in an O(n^2) pairwise partsMatch pass over the expanded set. Exploitation requires the pattern to be parsed with optimizationLevel set to 2 or higher.

Remediation

Upgrade minimatch to version 11.0.1 or higher.

References

medium severity

Improper Encoding or Escaping of Output

  • Vulnerable module: uri-js
  • Introduced through: electron-store@5.2.0

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › electron-store@5.2.0 › conf@6.2.4 › ajv@6.15.0 › uri-js@4.4.1

Overview

uri-js is a RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.

Affected versions of this package are vulnerable to Improper Encoding or Escaping of Output via pctDecChars(), which decodes invalid and overlong percent-encoded sequences into ASCII metacharacters. An attacker can craft percent-encoded payloads to bypass platform decoder validation and inject path traversal or CRLF sequences that downstream consumers process without filtering.

Remediation

There is no fixed version for uri-js.

References

medium severity

Symlink Attack

  • Vulnerable module: tmp
  • Introduced through: tmp-promise@2.1.1

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › tmp-promise@2.1.1 › tmp@0.1.0
    Remediation: Upgrade to tmp-promise@3.0.0.

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

Missing Release of Resource after Effective Lifetime

  • Vulnerable module: inflight
  • Introduced through: tmp-promise@2.1.1

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › tmp-promise@2.1.1 › tmp@0.1.0 › rimraf@2.7.1 › 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
new

Modification of Assumed-Immutable Data (MAID)

  • Vulnerable module: i18next
  • Introduced through: i18next@19.9.2

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › i18next@19.9.2
    Remediation: Upgrade to i18next@26.3.4.

Overview

i18next is an internationalization framework for browser or any other javascript environment (eg. node.js).

Affected versions of this package are vulnerable to Modification of Assumed-Immutable Data (MAID) via the deepExtend function in src/utils.js, which uses the in operator to check for property existence on the target object. Because the in operator traverses the prototype chain, an attacker who can supply a malicious resource bundle containing a property named hasOwnProperty can overwrite Object.prototype.hasOwnProperty, causing process-wide corruption of that built-in and crashing any subsequent code that relies on it.

Note: This is only exploitable when deepExtend is invoked with deep merging enabled, such as through addResourceBundle with the deep parameter set to true.

PoC

import i18next from 'i18next';

await i18next.init({ lng: 'en', resources: { en: { translation: {} } } });

const payload = { hasOwnProperty: { call: 'corrupted' } };
i18next.addResourceBundle('en', 'translation', payload, /* deep */ true, /* overwrite */ true);

// Process-wide corruption:
Object.prototype.hasOwnProperty.call({}, 'test'); // TypeError: ... is not a function

Note: The PoC uses i18next initialised with a default English translation resource and demonstrates process-wide corruption by overwriting Object.prototype.hasOwnProperty via addResourceBundle with deep and overwrite flags set to true.

Remediation

Upgrade i18next to version 26.3.4 or higher.

References

medium severity

Uncaught Exception

  • Vulnerable module: uri-js
  • Introduced through: electron-store@5.2.0

Detailed paths

  • Introduced through: com.octosign@durasj/octosign › electron-store@5.2.0 › conf@6.2.4 › ajv@6.15.0 › uri-js@4.4.1

Overview

uri-js is a RFC 3986/3987 compliant, scheme extendable URI/IRI parsing/validating/resolving library for JavaScript.

Affected versions of this package are vulnerable to Uncaught Exception in the parse() function of src/schemes/mailto.ts, whose to branch calls hfield[1].split(",") directly, while the subject, body, and default branches all route through unescapeComponent(), which short-circuits on a missing value. An attacker can crash the process by supplying a mailto URI whose query carries a bare to token with no =value, such as mailto:?to, so splitting on = yields a one element array and the undefined second element is dereferenced. This requires the application to pass an attacker-influenced string to URI.parse(), URI.resolve(), URI.normalize(), or URI.equal(), none of which wrap the scheme handler in a try/catch, and whether the throw terminates the process or only fails the one request depends on the host's own error handling.

Remediation

There is no fixed version for uri-js.

References