I know who needs to hear this, but I'm not sure they follow me on here.
You can't wrap a Linux shell safely.
I know you're going to try. I know that it's super easy to just like pass arbitrary text through your cute little CLI tool or web interface or whatevs.
But the perl CGI folks couldn't do it, the web servers couldn't do it, the network device folks couldn't do it, nobody can do it.
It's not a good pattern. Please. Stop.
(This message brought to you by the PSIRT Council and our generous donors: $ () {} && || ` ; > < ../ and so many others that I can't remember them all even though I've been watching you fail to do this well for over 2 decades)