We’ve got a lot of questions about how to protect your server against the shellshock bash vulnerability. Here are the answers.
Very Important!
Information about a critical vulnerability called Shellshock (or Bash Bug), which allows unauthorised code execution on remote systems, has been disclosed. Your servers and routers could possible be vulnerable. Currently, we are observing distributed scans of various subnets of the internet in search of vulnerable servers and theirs further infection with server malware.
What is it?
The Shellshock vulnerability can be exploited on systems that are running Services or applications that allow unauthorised remote users to assign Bash environment variables. Some of them:
Details of vulnerability here: CVE-2014–6271, CVE-2014–7169.
Why is it dangerous?
How do I protect myself?
For systems in general
For web applications
FAQ: How to check for Shellshock vulnerability
On each of your systems, you may check for Shellshock vulnerability by running the following command at the bash prompt:
env 'x=() { :;}; echo vulnerable' 'BASH_FUNC_x()=() { :;}; echo vulnerable' bash -c "echo test" If you see the following output, your version of Bash is vulnerable and should be updated:
vulnerable
bash: BASH_FUNC_x(): line 0: syntax error near unexpected token `)'
bash: BASH_FUNC_x(): line 0: `BASH_FUNC_x() () { :;}; echo vulnerable'
bash: error importing function definition for `BASH_FUNC_x'
test If there is no vulnerable! in output, your version of bash is not vulnerable.
FAQ: How to update Bash?
The easiest way to fix the vulnerability is to use your default package manager to update the version of Bash
Ubuntu / Debian:
sudo apt-get update && sudo apt-get install --only-upgrade bash CentOS / Red Hat / Fedora:
sudo yum update bash To fix BashBug in Mac OS X, this OS X bash Update 1.0 is available.
Now check your system for vulnerability again.
FAQ: How to mitigate ShellShock threat with WAF (Web Application Firewall)
Web Application Firewall constantly analyses all the requests come to application. Though ShellShock is extremely destructive, it is rather easy to detect.
Red Hat customer portal gives quite effective CRS rules for opensource WAF mod_security tool. As it said there, the following mod_security rules can be used to reject HTTP requests containing data that may be interpreted by Bash as a function definition if set in its environment. They can be used to block attacks against web services, such as attacks against CGI applications:
Request Header values:
SecRule REQUEST_HEADERS ^(s*)s+{" "phase:1,deny,id:1000000,t:urlDecode,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" SERVER_PROTOCOL values:
SecRule REQUEST_LINE "^(s*)s+{" "phase:1,deny,id:1000001,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" GET/POST names:
SecRule ARGS_NAMES "^(s*)s+{" "phase:2,deny,id:1000002,t:urlDecode,t:urlDecodeUni,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" GET/POST values:
SecRule ARGS "^(s*)s+{" "phase:2,deny,id:1000003,t:urlDecode,t:urlDecodeUni,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" File names for uploads:
SecRule FILES_NAMES "^(s*)s+{" "phase:2,deny,id:1000004,t:urlDecode,t:urlDecodeUni,status:400,log,msg:'CVE-2014-6271 - Bash Attack'" But be aware of possible false positives. Here is a pretty good HOWTO for those who want to start using mod_security.
We’re sure that the most of commercials WAFs (as well as Wallarm) can effectively block ShellShock attacks to protected application.
Be protected!
Is an AI-to-AI attack scenario a science fiction possibility only for blockbusters like the Terminator…
Lefteris Tzelepis, CISO at Steelmet /Viohalco Companies, was shaped by cybersecurity. From his early exposure…
This is a predictions blog. We know, we know; everyone does them, and they can…
The attack landscape has been dynamic following the disclosure of the React Server Components RCE…
As the year draws to a close, it’s worth pausing to look back on what…
On December 3, 2025, React maintainers disclosed a critical unauthenticated remote code execution (RCE) vulnerability…