Skip to content
Prev 60568 / 63421 Next

[External] security holes in system2

If this is affecting you now and you need a solution then the `sys` package
has `exec_wait`:

The hacker tries and succeeds in running `rm` with `system2`:

 > system2("echo", args="hello world ; rm /etc/systemfile")
hello world
rm: cannot remove '/etc/systemfile': No such file or directory

because the semicolon starts a new command, but fails with `sys::exec_wait`:
hello world ; rm /etc/systemfile

where it echoes all the args.

For simple applications it should be a drop-in replacement.

best,
 Bobby Tables