Shellshock (CVE-2014-6271): The Bash Vulnerability That Hit CGI Scripts and Embedded Devices
Summary
Shellshock, disclosed on September 24, 2014, was a family of vulnerabilities in the GNU Bash shell (the primary one tracked as CVE-2014-6271) that allowed attackers to execute arbitrary commands by crafting specially formatted environment variables.
Technical Root Cause
Bash's function-definition parsing continued executing code that appeared after the end of a function definition inside an environment variable's value. Any program that set environment variables from untrusted input and then invoked Bash — most commonly CGI scripts on web servers, but also DHCP clients and various embedded device management interfaces — could be tricked into running attacker-supplied commands. This maps to CWE-78 (OS Command Injection).
Why It Mattered
Bash is installed by default on the vast majority of Linux and Unix-like systems, and was invoked indirectly by huge numbers of CGI scripts, network daemons, and embedded device firmware that developers didn't necessarily realize were exposed. Exploitation attempts began within hours of disclosure, and the vulnerability required multiple follow-up patches (the initial fix was incomplete).
OWASP / CWE Mapping
- CWE-78: Improper Neutralization of Special Elements used in an OS Command
- OWASP A03:2021: Injection
Lasting Impact
Shellshock is frequently cited alongside Heartbleed (disclosed the same year) as evidence that decades-old, widely trusted software components can carry serious undiscovered vulnerabilities, and it drove increased scrutiny of exactly which system utilities are reachable from untrusted network input, not just application-layer code.
How Safeguard Helps
Safeguard's scanning flags known-vulnerable system package versions (including base OS components like Bash) in container images and infrastructure, not just application-level dependencies.
References
- CVE-2014-6271: https://nvd.nist.gov/vuln/detail/CVE-2014-6271
- CWE-78: https://cwe.mitre.org/data/definitions/78.html