Shellshock vulnerability
![]() | It has been suggested that this article be merged with CVE-2014-6721 and Shellshock (software bug). (Discuss) Proposed since September 2014. |
![]() | This article documents a current event. Information may change rapidly and initial news reports may be unreliable. The latest updates to this article may not reflect the most current information. |
The shellshock vulnerability (NVD identifer CVE-2014-7169) is a security bug affecting Unix-like operating systems through the bash shell, a shell environment used for a variety of tasks on Linux and Mac OS X systems. First disclosed on September 24 2014 and classfied then as CVE-2014-6271, it has been rated 10 (the maximum score) for severity by NIST.[1] An initial patch to mitigate the issue was found to be incomplete; a new patch was then released and NIST assigned a second code of CVE-2014-7169 to the bug.[2][3]
Shellshock affects Bash versions between 1.14 and 4.3 which are used on many Linux distributions, Mac OS X, and other operating systems. Some web servers also rely upon Bash to execute CGI scripts, and this bug could allow the execution of malicious code from remote computers.[4]
It is estimated that it potentially affects hundreds of millions of computers.[5] It was discovered by Stephane Chazelas.[6]
Attack details
GNU Bash through 4.3 processes trailing strings after function definitions in the values of environment variables, which allows remote attackers to execute arbitrary code via a crafted environment, as demonstrated by vectors involving the ForceCommand feature in OpenSSH sshd, the mod_cgi and mod_cgid modules in the Apache HTTP Server, scripts executed by unspecified DHCP clients, and other situations in which setting the environment occurs across a privilege boundary from Bash execution.
Examples
Example of shell output on vulnerable system:[7]
$ env env x='() { :;}; echo vulnerable' bash -c 'echo this is a test'
vulnerable
this is a test
Output after initial patch:
$ env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test
Remaining vulnerability CVE-2014-7169:
$ env X='() { (a)=>\' sh -c "echo date"; cat echo
sh: X: line 1: syntax error near unexpected token `='
sh: X: line 1: `'
sh: error importing function definition for `X'
Thu 25 Sep 2014 08:50:18 BST
References
- ^ "NVD Vulnerability Summary for CVE-2014-6271". Retrieved 25 September 2014.
- ^ a b "NVD Vulnerability Summary for CVE-2014-7169". Retrieved 25 September 2014.
- ^ Huzaifa Sidhpurwala (2014-09-24). "Bash specially-crafted environment variables code injection attack". Red Hat.
- ^ "Shellshock BASH Vulnerability Tester". Retrieved 25 September 2014.
- ^ "BBC News - Shellshock: 'Deadly serious' new vulnerability found". BBC News. Retrieved 25 September 2014.
- ^ "oss-sec: CVE-2014-6271: remote code execution through bash". Retrieved 25 September 2014.
- ^ "How do I recompile Bash to avoid the remote exploit CVE-2014-6271 and CVE-2014-7169". Retrieved 25 September 2014.
External links
- shellshocker.net - An online tester for the vulnerability