{"id":"JLSEC-2026-103","summary":"Insufficient permission checking in `Deno.makeTemp*` APIs","details":"### Impact\n\nInsufficient validation of parameters in `Deno.makeTemp*` APIs would allow for creation of files outside of the allowed directories. This may allow the user to overwrite important files on the system that may affect other systems.\n\nA user may provide a prefix or suffix to a `Deno.makeTemp*` API containing path traversal characters. The permission check would prompt for the base directory of the API, but the final file that was created would be outside of this directory:\n\n```\n$ mkdir /tmp/good\n$ mkdir /tmp/bad\n$ deno repl --allow-write=/tmp/good\n\u003e Deno.makeTempFileSync({ dir: \"/tmp/bad\" })\n┌ ⚠️  Deno requests write access to \"/tmp/bad\".\n├ Requested by `Deno.makeTempFile()` API.\n├ Run again with --allow-write to bypass this prompt.\n└ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all write permissions) \u003e n\n❌ Denied write access to \"/tmp/bad\".\nUncaught PermissionDenied: Requires write access to \"/tmp/bad\", run again with the --allow-write flag\n    at Object.makeTempFileSync (ext:deno_fs/30_fs.js:176:10)\n    at \u003canonymous\u003e:1:27\n\u003e Deno.makeTempFileSync({ dir: \"/tmp/good\", prefix: \"../bad/\" })\n\"/tmp/good/../bad/a9432ef5\"\n$ ls -l /tmp/bad/a9432ef5\n-rw-------@ 1 user  group  0 Mar  4 09:20 /tmp/bad/a9432ef5\n```\n\n### Patches\n\nThis is fixed in Deno 1.41.1.","modified":"2026-04-14T13:31:35.533261615Z","published":"2026-04-14T13:10:46.494Z","upstream":["CVE-2024-27931","EUVD-2024-0943","GHSA-hrqr-jv8w-v9jh"],"database_specific":{"license":"CC-BY-4.0","sources":[{"imported":"2026-04-14T12:58:55.018Z","id":"CVE-2024-27931","html_url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27931","url":"https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2024-27931","published":"2024-03-05T17:15:07.310Z","modified":"2025-01-03T19:29:35.223Z"},{"imported":"2026-04-14T12:59:06.590Z","id":"GHSA-hrqr-jv8w-v9jh","html_url":"https://github.com/advisories/GHSA-hrqr-jv8w-v9jh","url":"https://api.github.com/advisories/GHSA-hrqr-jv8w-v9jh","published":"2024-03-05T16:19:44Z","modified":"2024-03-05T20:30:05Z"},{"imported":"2026-04-14T12:58:57.176Z","id":"EUVD-2024-0943","html_url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-0943","url":"https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2024-0943","published":"2024-03-05T16:43:11Z","modified":"2024-08-02T00:41:55Z"}]},"references":[{"type":"WEB","url":"https://github.com/denoland/deno/security/advisories/GHSA-hrqr-jv8w-v9jh"},{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27931"},{"type":"WEB","url":"https://github.com/advisories/GHSA-hrqr-jv8w-v9jh"}],"affected":[{"package":{"name":"Deno_jll","ecosystem":"Julia","purl":"pkg:julia/Deno_jll?uuid=04572ae6-984a-583e-9378-9577a1c2574d"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.0+0"}]}],"database_specific":{"source":"https://github.com/JuliaLang/SecurityAdvisories.jl/tree/generated/osv/2026/JLSEC-2026-103.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N"}],"credits":[{"name":"ericcornelissen","contact":["https://github.com/ericcornelissen"],"type":"REPORTER"},{"name":"mmastrac","contact":["https://github.com/mmastrac"],"type":"REMEDIATION_DEVELOPER"}]}