{"id":"CVE-2025-61787","aliases":["EUVD-2025-33179","GHSA-m2gf-x3f6-8hq3","JLSEC-2026-113"],"status":"published","title":"Deno is Vulnerable to Command Injection on Windows During Batch File Execution","description":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Versions prior to 2.5.3 and 2.2.15 are vulnerable to Command Line Injection attacks on Windows when batch files are executed. In Windows, ``CreateProcess()`` always implicitly spawns ``cmd.exe`` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows. Versions 2.5.3 and 2.2.15 fix the issue.","severity":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.02084,"percentile":0.81721,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-77"],"published":"2025-10-08T00:59:17Z","modified":"2026-10-28T02:30:23Z","fixes":[{"ecosystem":"crates.io","package":"deno","fixed_in":["2.5.2"],"sources":["ghsa","osv"]},{"ecosystem":"Julia","package":"Deno_jll","fixed_in":["2.6.3+0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"deno","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.5.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"deno","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.5.2"}]}]},{"source":"osv","ecosystem":"Julia","package":"Deno_jll","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.6.3+0"}]}]}],"products":[{"vendor":"deno","product":"deno"},{"vendor":"denoland","product":"deno"}],"references":[{"url":"https://github.com/denoland/deno/security/advisories/GHSA-m2gf-x3f6-8hq3","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/denoland/deno/pull/30818","tags":["x_refsource_MISC","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/denoland/deno/commit/8a0990ccd37bafd8768176ca64b906ba2da2d822","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/denoland/deno/releases/tag/v2.2.15","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/denoland/deno/releases/tag/v2.5.3","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61787","tags":["advisory","web"]},{"url":"https://github.com/denoland/deno/releases/tag/v2.5.2","tags":["web"]},{"url":"https://github.com/advisories/GHSA-m2gf-x3f6-8hq3","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/61xxx/CVE-2025-61787.json","tags":["advisory"]},{"url":"https://github.com/denoland/deno","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2025-61787","title":"Deno is Vulnerable to Command Injection on Windows During Batch File Execution","description":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Versions prior to 2.5.3 and 2.2.15 are vulnerable to Command Line Injection attacks on Windows when batch files are executed. In Windows, ``CreateProcess()`` always implicitly spawns ``cmd.exe`` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows. Versions 2.5.3 and 2.2.15 fix the issue.","status":"published","published":"2025-10-08T00:59:17.322Z","modified":"2025-10-08T18:51:09.772Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T14:32:45.105469Z"}],"euvd":[{"id":"EUVD-2025-33179","description":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Versions prior to 2.5.3 and 2.2.15 are vulnerable to Command Line Injection attacks on Windows when batch files are executed. In Windows, ``CreateProcess()`` always implicitly spawns ``cmd.exe`` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows. Versions 2.5.3 and 2.2.15 fix the issue.","status":"published","published":"2025-10-08T00:59:17Z","modified":"2025-10-08T18:51:09Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T20:31:34.988595Z"}],"ghsa":[{"id":"GHSA-m2gf-x3f6-8hq3","title":"Deno is Vulnerable to Command Injection on Windows During Batch File Execution","description":"### Summary\nDeno versions up to 2.5.1 are vulnerable to Command Line Injection attacks on Windows when batch files are executed.\n\n### Details\nIn Windows, ``CreateProcess()`` always implicitly spawns ``cmd.exe`` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows as demonstrated by the two proves-of-concept below.\n\n### PoC\nUsing `node:child_process` (with the `env` and `run` permissions):\n```JS\nconst { spawn } = require('node:child_process');\nconst child = spawn('./test.bat', ['\u0026calc.exe']);\n```\nUsing `Deno.Command.spawn()` (with the `run` permission):\n```JS\nconst command = new Deno.Command('./test.bat', {\n  args: ['\u0026calc.exe'],\n});\nconst child = command.spawn();\n```\n\n### Impact\nBoth of these scripts result in opening calc.exe on Windows, thus allowing a Command Line Injection attack when user-provided arguments are passed if the script being executed by the child process is a batch script.","status":"published","published":"2025-10-08T18:16:24Z","modified":"2025-10-08T18:16:25Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T14:38:59.83883Z"}],"nvd":[{"id":"CVE-2025-61787","description":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Versions prior to 2.5.3 and 2.2.15 are vulnerable to Command Line Injection attacks on Windows when batch files are executed. In Windows, ``CreateProcess()`` always implicitly spawns ``cmd.exe`` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows. Versions 2.5.3 and 2.2.15 fix the issue.","status":"published","published":"2025-10-08T02:15:41.897Z","modified":"2026-10-08T13:10:00.2Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T14:11:35.93863Z"}],"osv":[{"id":"CVE-2025-61787","title":"Deno is Vulnerable to Command Injection on Windows During Batch File Execution","description":"Deno is a JavaScript, TypeScript, and WebAssembly runtime. Versions prior to 2.5.3 and 2.2.15 are vulnerable to Command Line Injection attacks on Windows when batch files are executed. In Windows, ``CreateProcess()`` always implicitly spawns ``cmd.exe`` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows. Versions 2.5.3 and 2.2.15 fix the issue.","status":"published","published":"2025-10-08T00:59:17.322Z","modified":"2026-10-28T02:30:23.066204842Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T15:44:51.516975Z"},{"id":"GHSA-m2gf-x3f6-8hq3","title":"Deno is Vulnerable to Command Injection on Windows During Batch File Execution","description":"### Summary\nDeno versions up to 2.5.1 are vulnerable to Command Line Injection attacks on Windows when batch files are executed.\n\n### Details\nIn Windows, ``CreateProcess()`` always implicitly spawns ``cmd.exe`` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows as demonstrated by the two proves-of-concept below.\n\n### PoC\nUsing `node:child_process` (with the `env` and `run` permissions):\n```JS\nconst { spawn } = require('node:child_process');\nconst child = spawn('./test.bat', ['\u0026calc.exe']);\n```\nUsing `Deno.Command.spawn()` (with the `run` permission):\n```JS\nconst command = new Deno.Command('./test.bat', {\n  args: ['\u0026calc.exe'],\n});\nconst child = command.spawn();\n```\n\n### Impact\nBoth of these scripts result in opening calc.exe on Windows, thus allowing a Command Line Injection attack when user-provided arguments are passed if the script being executed by the child process is a batch script.","status":"published","published":"2025-10-08T18:16:24Z","modified":"2025-10-08T18:42:29.570571Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T15:46:51.10002Z"},{"id":"JLSEC-2026-113","title":"Deno is Vulnerable to Command Injection on Windows During Batch File Execution","description":"### Summary\n\nDeno versions up to 2.5.1 are vulnerable to Command Line Injection attacks on Windows when batch files are executed.\n\n### Details\n\nIn Windows, `CreateProcess()` always implicitly spawns `cmd.exe` if a batch file (.bat, .cmd, etc.) is being executed even if the application does not specify it via the command line. This makes Deno vulnerable to a command injection attack on Windows as demonstrated by the two proves-of-concept below.\n\n### PoC\n\nUsing `node:child_process` (with the `env` and `run` permissions):\n\n```JS\nconst { spawn } = require('node:child_process');\nconst child = spawn('./test.bat', ['\u0026calc.exe']);\n```\n\nUsing `Deno.Command.spawn()` (with the `run` permission):\n\n```JS\nconst command = new Deno.Command('./test.bat', {\n  args: ['\u0026calc.exe'],\n});\nconst child = command.spawn();\n```\n\n### Impact\n\nBoth of these scripts result in opening calc.exe on Windows, thus allowing a Command Line Injection attack when user-provided arguments are passed if the script being executed by the child process is a batch script.","status":"published","published":"2026-04-14T13:10:46.494Z","modified":"2026-07-18T00:01:28.47329276Z","cvss":[{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T15:47:18.159338Z"}]}}
