https://sysdig.com/blog/friends-dont-let-friends-curl-bash/
https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...
These attacks can be mounted on the network side.
Also you can inadvertently execute data from a benign captive portal or a server error page and so on.