$ env 'x=() { :} echo vulnerable' 'BASH_FUNC_x()=() { :} echo vulnerable' bash -c "echo test"
If you're vulnerable, you will get a similar message.
$ env 'x=() { :} echo vulnerable' 'BASH_FUNC_x()=() { :} echo vulnerable' bash -c "echo test"
vulnerable
bash: BASH_FUNC_x(): line 0: syntax error near unexpected token `)'
bash: BASH_FUNC_x(): line 0: `BASH_FUNC_x() () { :} echo vulnerable'
bash: error importing function definition for `BASH_FUNC_x'
test
vulnerable
bash: BASH_FUNC_x(): line 0: syntax error near unexpected token `)'
bash: BASH_FUNC_x(): line 0: `BASH_FUNC_x() () { :} echo vulnerable'
bash: error importing function definition for `BASH_FUNC_x'
test
To fix
Linux:
#yum update bash
Apple:
Install latest OS X 10.9.5, download /batch patch update