Re:Everything you need to know about the Shellshock Bash bug
by pstrateman on Thursday September 25, 2014 @07:37PM
(#8370449)
PHP is specifically designed to deal with unsanitized user input.
bash is not, seems pretty obvious
Furthermore, in the sample attacks the php scripts don't 'use' that user input in any way; bash gets them because, well, it shares the same environment and its variables. If you'd want a php script 'sanitizing' those variables then it would mean checking for any possible HTTP_ environment variables and explicitly altering them even if the script doesn't recognize them - which seems ridiculous as well.