DEP0190:在 node:child_process 的 execFile/spawn 中使用 shell 选项为 true 时传递 args


【DEP0190: Passing args to node:child_process execFile/spawn with shell option true

类型:运行时

【Type: Runtime】

当将 args 数组与选项 { shell: true } 一起传递给 child_process.execFilechild_process.spawn 时,值不会被转义,只是用空格分隔,这可能导致 shell 注入。

【When an args array is passed to child_process.execFile or child_process.spawn with the option { shell: true }, the values are not escaped, only space-separated, which can lead to shell injection.】