* A file system should store your bytes, though nothing prevents a file system written in C from executing, say, logged HTTP requests as commands.
* A CGI script should sanitize form data, though nothing prevents a PHP script from blithely shoving unsanitized data into SQL queries.
* And a shell should pass environment variables to subprocesses, though nothing prevents it from interpreting variable values (or names, or a combination of names, values and the time of day) as commands.
As I said - I don't think it's a security bug in bash, just another one of endless misfeatures. It's about as crazy to interpret environment variable values as code because they have a special-cased form as it would be to interpret, say, file names as code, or certain byte sequences passed to the write() system call as code, etc.
Of course some people would pipe to shell in their .forward file and eventually get pwnt, but it was a freshman mistake, and the damage was isolated.
Once you reach the point of executing a shell with an euid other than your own, it's not the shell's job to sanity check your actions.
The web has changed the execution model thoroughly. And people now do lazy things based on their loose understanding of flexible execution models.
This is neither a bug in bash, nor a bug in Apache, etc. It's an integration bug between two complex systems that were designed with zero-to-poor knowledge of each other.
cat downloaded_file.txt |\
while read inputline
do
#some processing
#call another shell program
done
In this case, bash would still be vulnerable even without the Internet involved -- just processing a data file you got from Bob in Accounting.As to the article you linked to, I recall that it mentions that the feature in question is actually from the early 90s when it might well have become a security bug... though I still think it's beside the point.