Summary
On Node.js v24, the gateway emits the following deprecation warning on startup:
(node:XXXXX) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
This appears to be triggered by a child_process.spawn() call in OpenClaw's codebase where both a separate args array and { shell: true } are passed together. Node.js v24 introduced DEP0190 to flag this pattern because the args are concatenated without shell-escaping, which can allow shell injection if any argument contains user-controlled input.
Steps to reproduce
- Run OpenClaw gateway on Node.js v24+
- Check the gateway log or console output after startup
- Observe:
[DEP0190] DeprecationWarning: Passing args to a child process with shell option true...
Expected behaviour
No DEP0190 warning. Child processes should either:
- Use
shell: false with a properly constructed args array (preferred), or
- Use
shell: true without a separate args array (pass a single command string)
Actual behaviour
DEP0190 warning emitted on every gateway start on Node.js v24+. Not breaking — gateway functions normally — but indicates a latent shell injection risk and will become noisier as Node.js deprecation tracking tightens.
Environment
- OpenClaw: v2026.4.5
- Node.js: v24.6.0
- OS: Windows 10 x64 (build 19045)
Additional context
The full deprecation trace can be obtained by running the gateway with --trace-deprecation:
node --trace-deprecation C:\...\openclaw\dist\index.js gateway
This would identify the exact line in the source where the spawn call with { shell: true, args: [...] } occurs.
The fix is straightforward: locate all spawn/execFile calls using { shell: true } with a separate args array and either switch to shell: false or restructure to pass a single command string. This also removes the theoretical shell injection surface if any of those arguments ever incorporate external input.
Summary
On Node.js v24, the gateway emits the following deprecation warning on startup:
This appears to be triggered by a
child_process.spawn()call in OpenClaw's codebase where both a separateargsarray and{ shell: true }are passed together. Node.js v24 introduced DEP0190 to flag this pattern because the args are concatenated without shell-escaping, which can allow shell injection if any argument contains user-controlled input.Steps to reproduce
[DEP0190] DeprecationWarning: Passing args to a child process with shell option true...Expected behaviour
No DEP0190 warning. Child processes should either:
shell: falsewith a properly constructed args array (preferred), orshell: truewithout a separate args array (pass a single command string)Actual behaviour
DEP0190 warning emitted on every gateway start on Node.js v24+. Not breaking — gateway functions normally — but indicates a latent shell injection risk and will become noisier as Node.js deprecation tracking tightens.
Environment
Additional context
The full deprecation trace can be obtained by running the gateway with
--trace-deprecation:This would identify the exact line in the source where the spawn call with
{ shell: true, args: [...] }occurs.The fix is straightforward: locate all
spawn/execFilecalls using{ shell: true }with a separate args array and either switch toshell: falseor restructure to pass a single command string. This also removes the theoretical shell injection surface if any of those arguments ever incorporate external input.