Security vulnerability in hs.execute
function, susceptible to shell injection attacks
#3701
Milestone
hs.execute
function, susceptible to shell injection attacks
#3701
hs.execute
is vulnerable to shell injection attacks due to the lack of input escaping.The most problematic line is
when
with_user_env
is set to true.If, e.g., someone sent a request to execute the following to Hammerspoon:
It would result in the command execution of:
(Assuming $SHELL envvar is set to /bin/bash.)
Here is the proposed fix:
The text was updated successfully, but these errors were encountered: