Shellshock is a critical vulnerability in the GNU Bash shell. It affects versions through 4.3 and allows remote attackers to execute arbitrary code. This exploit occurs due to how Bash processes trailing strings after function definitions in the values of environment variables.
The Shellshock vulnerability allows an attacker to inject and execute code via specially crafted environment variables. These variables can be set through various vectors, such as:
- The ForceCommand feature in OpenSSH's
sshd
- The mod_cgi and mod_cgid modules in the Apache HTTP Server
- Scripts executed by unspecified DHCP clients
These scenarios involve setting environment variables across a privilege boundary, making it possible for attackers to execute arbitrary code with elevated privileges.