-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use system2 to avoid shell injection #460
Comments
Could you elaborate on the threat model here? If someone's in a position to call this function, I'd expect that they would already be able to run arbitrary R code, which means they could call |
What's preventing someone from leaving an API into this function from e.g. a shiny app? is there a reason to prefer system() here? it seems the output is not captured anyway so the behavior AIUI should be the same |
Are you sure Reading that code makes me believe that I could try to write a Please correct me if I am wrong but it seems to me that injecting code in |
Indeed that's right. Should we just run |
If I had to run an external process without a shell I would use |
htmlwidgets/R/scaffold.R
Line 121 in 7b9c1ea
IINM this could be subject to shell injection if
pkg
can be passed as an arbitrary input.system2() should have roughly the same level of code complexity & avoids this issue
The text was updated successfully, but these errors were encountered: