Recombi.net > Fix for [Bash Shellshock Vulnerability] on GNU/Linux

This patch method worked for Ubuntu 10.10 and should work for most older distributions, installing the latest bash with the patch, note it might require a proper build environment with gcc and attendant tools
Bash Shellshock Fix: log in as root, cd /root, and create a shell script copy&paste following + enable executable flag + run the following (bashshellshockfix.sh) i.e. chmod +x bashshellshockfix.sh;./bashshellshockfix.sh;
mkdir bash-patch
cd bash-patch
wget https://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz
#download all patches
for i in $(seq -f "%03g" 1 42); do wget https://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done
tar zxvf bash-4.3.tar.gz
cd bash-4.3
#apply all patches
for i in $(seq -f "%03g" 1 42);do patch -p0 < ../bash43-$i; done
#build and install
./configure && make && make install
cd ..
cd ..
rm -r bash-patch

Might require a new shell session or reboot for changes to be noticed. Do the following test after the new bash has installed:
Bash Shellshock Test : If found to be vulnerable it will return vulnerable(newline)this is a test - see success example further below to see results of a successful fix.
env x='() { :;}; echo vulnerable' bash -c "echo this is a test" vulnerable this is a test
Successful Test Output
$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test" vulnerable this is a test
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test