tmp

Ecosystem: npm

Downloads: 366.39 Mln

Vulnerabilities from the last (months)
  • 0CriticalAffects 0 versions
  • 2HighAffects 2 versions
  • 0MediumAffects 0 versions
  • 0ModerateAffects 0 versions
  • 1LowAffects 1 version
Severity distribution (all time)
3vulnerabilities
  • Critical0 (0.0%)
  • High2 (66.7%)
  • Medium0 (0.0%)
  • Moderate0 (0.0%)
  • Low1 (33.3%)

Monthly breakdown

  • Critical
  • High
  • Medium
  • Moderate
  • Low
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 1
    • Medium: 0
    • Moderate: 0
    • Low: 0
  • 1 vulnerabilities
    • Critical: 0
    • High: 0
    • Medium: 0
    • Moderate: 0
    • Low: 1

Vulnerabilities (3)

Known vulnerabilities affecting tmp, based on data from OSV.

Vulnerabilities affecting tmp
IDSeveritySummaryAffected versionsPublishedSource
GHSA-7c78-jf6q-g5cmHightmp: Type-confusion bypass of _assertPath allows path traversal via non-string prefix/postfix/template### Summary The `_assertPath` guard added to `tmp@0.2.6` rejects only string values that contain the substring `..`. It is bypassed when `prefix`, `postfix`, or `template` is supplied as a non-string value (Array, Buffer, or any object) whose `includes('..')` returns falsy but whose stringification still contains `../`. The value flows through `Array.prototype.join`/`String` coercion inside `_generateTmpName` and `path.join(tmpDir, opts.dir, name)`, producing a final path that escapes `tmpdir` and creates a file or directory at an attacker-controlled location with the host process's privilege
  • >= 0.2.6, < 0.2.7
GitHub (opens in a new tab)
GHSA-ph9p-34f9-6g65Hightmp has Path Traversal via unsanitized prefix/postfix that enables directory escape### Summary The tmp npm package contains a path traversal vulnerability that allows escaping the intended temporary directory when untrusted data flows into the `prefix`, `postfix`, or `dir` options. By embedding traversal sequences (e.g., `../`) or path separators in these parameters, attackers can cause files to be created outside the configured temporary base directory at attacker-controlled locations with the privileges of the running process. This vulnerability affects applications that pass user-controlled data to tmp's file/directory creation functions without proper input sanitization
  • < 0.2.6
GitHub (opens in a new tab)
GHSA-52f5-9888-hmc6Lowtmp allows arbitrary temporary file / directory write via symbolic link `dir` parameter### Summary `tmp@0.2.3` is vulnerable to an Arbitrary temporary file / directory write via symbolic link `dir` parameter. ### Details According to the documentation there are some conditions that must be held: ``` // https://github.com/raszi/node-tmp/blob/v0.2.3/README.md?plain=1#L41-L50 Other breaking changes, i.e. - template must be relative to tmpdir - name must be relative to tmpdir - dir option must be relative to tmpdir //<-- this assumption can be bypassed using symlinks are still in place. In order to override the system's tmpdir, you will have to use the newly introduced tmpd
  • < 0.2.4
GitHub (opens in a new tab)
  • GHSA-7c78-jf6q-g5cmHigh
    tmp: Type-confusion bypass of _assertPath allows path traversal via non-string prefix/postfix/template
    • >= 0.2.6, < 0.2.7

    ### Summary The `_assertPath` guard added to `tmp@0.2.6` rejects only string values that contain the substring `..`. It is bypassed when `prefix`, `postfix`, or `template` is supplied as a non-string value (Array, Buffer, or any object) whose `includes('..')` returns falsy but whose stringification still contains `../`. The value flows through `Array.prototype.join`/`String` coercion inside `_generateTmpName` and `path.join(tmpDir, opts.dir, name)`, producing a final path that escapes `tmpdir` and creates a file or directory at an attacker-controlled location with the host process's privilege

    CVE: CVE-2026-49982

  • GHSA-ph9p-34f9-6g65High
    tmp has Path Traversal via unsanitized prefix/postfix that enables directory escape
    • < 0.2.6

    ### Summary The tmp npm package contains a path traversal vulnerability that allows escaping the intended temporary directory when untrusted data flows into the `prefix`, `postfix`, or `dir` options. By embedding traversal sequences (e.g., `../`) or path separators in these parameters, attackers can cause files to be created outside the configured temporary base directory at attacker-controlled locations with the privileges of the running process. This vulnerability affects applications that pass user-controlled data to tmp's file/directory creation functions without proper input sanitization

    CVE: CVE-2026-44705

  • GHSA-52f5-9888-hmc6Low
    tmp allows arbitrary temporary file / directory write via symbolic link `dir` parameter
    • < 0.2.4

    ### Summary `tmp@0.2.3` is vulnerable to an Arbitrary temporary file / directory write via symbolic link `dir` parameter. ### Details According to the documentation there are some conditions that must be held: ``` // https://github.com/raszi/node-tmp/blob/v0.2.3/README.md?plain=1#L41-L50 Other breaking changes, i.e. - template must be relative to tmpdir - name must be relative to tmpdir - dir option must be relative to tmpdir //<-- this assumption can be bypassed using symlinks are still in place. In order to override the system's tmpdir, you will have to use the newly introduced tmpd

    CVE: CVE-2025-54798

Showing 1-3 of 3 vulnerabilities