Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Shellshock?

Shellshock (CVE-2014-6271) let an attacker run commands on any system where Bash processed an attacker-influenced environment variable, which in 2014 meant a very large part of the internet.

Illustration for the cybersecurity term Shellshock
Home / Blog / Cybersecurity Terms / What Is Shellshock?
17 November 2026

What Is Shellshock?

What Is Shellshock?

Shellshock is CVE-2014-6271, a vulnerability in GNU Bash that allowed arbitrary command execution whenever Bash was started with an environment variable whose value an attacker could influence. Stephane Chazelas found it and reported it privately, and it was disclosed on 24 September 2014. The flaw had been present since Bash version 1.14, released in 1989—roughly twenty-five years of exposure.

The Feature That Became a Flaw

Bash supports exporting shell functions to child processes. The mechanism is unusual: the function is passed through the environment as a variable whose value begins with () {, and when a new Bash process starts it recognises that prefix and defines the function.

The parser, however, did not stop at the end of the function definition. Anything following the closing brace was executed immediately as a command. So an environment variable set to:

() { :;}; /usr/bin/id

caused Bash to define an empty function and then run id, at start-up, before the shell had done anything else.

Setting an environment variable is not normally an attacker capability. The problem was how many systems did it with data from the network.

Where It Was Reachable

The Week It Broke

Exploitation began within hours of disclosure, which was faster than Heartbleed five months earlier because the exploit was a single HTTP header rather than a specialised protocol interaction. Mass scanning for vulnerable CGI endpoints started the same day.

The initial patch was also incomplete. Within a day, researchers showed the parser could still be reached by other means, producing CVE-2014-7169, and a cluster of further issues followed—CVE-2014-6277, CVE-2014-6278, CVE-2014-7186, and CVE-2014-7187—as the function parsing code received the scrutiny it had never previously had. Several rounds of distribution updates were required before the matter settled.

Payloads were mostly commodity: a botnet client named Wopbot appeared immediately, along with Mayhem and various IRC bots and reverse shells. Some embedded devices and network appliances were never patched at all and remain vulnerable today, which is where the occasional Shellshock finding in a scan still comes from.

Why It Still Comes Up

Shellshock and Heartbleed arrived months apart in 2014 and together changed how the industry thought about open source dependencies. Both were in code that almost everything relied on and almost nobody funded.

The specific technical lesson has aged well. Shellshock, Log4Shell, and the various expression-language injection flaws all share a shape: a component parses attacker-controlled data in a context where that data can be interpreted as instructions. The defence is the same in each case—do not pass untrusted input into an interpreter, and where that is unavoidable, make the interpreter’s dangerous features off by default.

The operational lesson is about reachability. Organisations that did not run CGI, or that blocked outbound connections from web servers so a reverse shell could not connect back, had a far less eventful week than those that did neither. That principle has not changed, and it is the reason we assess outbound filtering and legacy interface exposure as part of Web Application Security Services rather than only testing the application logic.

FAQ – Frequently Asked Questions

Is Shellshock Still Exploitable Today?

Not on maintained systems, which were patched in 2014. It still appears on embedded devices, network appliances, industrial equipment, and forgotten servers whose vendors never issued an update or whose owners never applied one. Scanners find it occasionally on internal networks, almost always on hardware that has been running untouched for a decade.

Does Shellshock Affect Only Bash?

The vulnerability is in Bash specifically, in its handling of exported shell functions. Other shells such as dash, zsh, ksh, and the BusyBox shell do not implement that mechanism and were unaffected. However, many systems have /bin/sh linked to Bash, so scripts that appear to use a different shell were still exposed. Checking the actual link target was part of assessing exposure.

How Was It Exploited Through a Web Server?

The CGI specification requires request headers to be placed in environment variables before the script runs. If that script was a shell script, or invoked one, a header such as User-Agent containing the crafted function prefix caused Bash to execute the attacker’s command as the web server user. Exploitation required nothing more than an HTTP request with a modified header.

What Is the Lasting Lesson from Shellshock?

Do not pass untrusted data into an interpreter, and assume any component that parses input may treat it as instructions. The supporting lesson is about limiting reachability: organisations that had retired CGI, or that blocked outbound connections from web servers so reverse shells could not establish, were substantially less affected regardless of how quickly they patched.

Related Terms

You May Be Interested In These

What Is AI Red Teaming?

Cybersecurity Terms

17 November 2026

What Is AI Red Teaming?

Read More
What Is Process Hollowing?

Cybersecurity Terms

17 November 2026

What Is Process Hollowing?

Read More
What Is Authenticated Received Chain?

Cybersecurity Terms

17 November 2026

What Is Authenticated Received Chain?

Read More