Use Python webbrowser
module instead of open_url
command to prevent arbitrary remote code execution.
#55
Labels
webbrowser
module instead of open_url
command to prevent arbitrary remote code execution.
#55
When a link in a preview is clicked, this package uses the
open_url
command to open the URL of the link. The intended behavior is to open the link in a web browser. However, when you pass afile://
URL toopen_url
, this is basically like double-clicking the target of the URL. If the target is (say) a shell script, then that script will run. On some OSes, it is possible to specifyfile://
URLs referring to unknown remote file shares, and the OS will attempt to connect to the share. As a result, you can create a URL that will execute arbitrary code if you click on the link in the preview.Instead, this package should use Python's built-in webbrowser module.
The text was updated successfully, but these errors were encountered: