Subject: | Systems using IPC::Open3 with IPC::Cmd are not actually safe |
Examine the difference in output between these two commands:
perl -MIPC::Cmd=run -e '$IPC::Cmd::VERBOSE=1;
$IPC::Cmd::USE_IPC_OPEN3=1;run(command => ["echo", "hello", ";cat
/etc/passwd;"])'
and:
perl -MIPC::Cmd=run -e '$IPC::Cmd::VERBOSE=1;
$IPC::Cmd::USE_IPC_RUN=1;run(command => ["echo", "hello", ";cat
/etc/passwd;"])'
The first one dumps /etc/password, the second does what I expect
IPC::Cmd to do from its documentation.