Even though most people are now aware of the Shellshock security problem on the bash shell, here is a test to check whether your Unix system is at risk:
[sourcecode language=”bash” gutter=”false”]
env x='() { :;}; echo vulnerable’ bash -c ‘echo hello’
[/sourcecode]
if the prompt returns vulnerable, it means the system is vulnerable and needs to be upgraded with the proper security patch… For instance running
[sourcecode language=”bash” gutter=”false”]
sudo apt-get update && sudo apt-get install –only-upgrade bash
[/sourcecode]
for Debian/Ubuntu versions. Check Apple support page for Apple OS.