On the command line run
$ env x='() { :;}; echo vulnerable' bash -c 'echo hello'
If the following message appears
vulnerable
hello
your system is affected by the exploit.
$ sudo yum update bash
$ sudo apt-get update && sudo apt-get --only-upgrade install bash
Run the
$ env x='() { :;}; echo vulnerable' bash -c 'echo hello'
command again, the following should be returned:
sh: X: line 1: syntax error near unexpected token
=' sh: X: line 1:
'
sh: error importing function definition for `X'