CVE-2014-6271
Critical · 9.8 CISA KEVCVSS
9.8
EPSS
100.0%
Published
Sep 24, 2014
CISA due date
Jul 28, 2022
Cloudanix analysis
A flaw in a common command-line tool lets attackers run any commands they want on vulnerable computers simply by sending specially crafted data through normal network services.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Trivial
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Command Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Bash processes trailing strings after function definitions in environment variable values, enabling arbitrary command execution when variables cross privilege boundaries into Bash contexts.
Why it matters to the business
Attackers can fully compromise affected systems across networks, leading to data breaches, service outages, and ransomware deployment; widespread prevalence across enterprise Linux environments amplifies operational disruption and requires urgent patching despite the age of the flaw.
How an attack unfolds
Attackers craft malicious environment variables containing function definitions followed by arbitrary commands, then trigger Bash execution via vectors such as SSH ForceCommand, CGI scripts in web servers, or DHCP clients; named threat actors have leveraged this in the wild to gain remote code execution across privilege boundaries.
How to fix it
Upgrade GNU Bash to a patched release that correctly handles environment variable parsing; apply vendor-specific updates for all affected distributions including Red Hat Enterprise Linux, SUSE Linux Enterprise, Debian, and Oracle Linux; restrict environment variable propagation across privilege boundaries where upgrades are delayed.
How to confirm the fix worked
Test systems by attempting to set an environment variable with a function definition followed by a command and observing whether the command executes; review patch levels against vendor advisories for the affected products; scan for unpatched Bash binaries in use.
Typical attack path
- Identify network-exposed services that invoke Bash with attacker-controlled environment variables
- Craft and inject environment variable containing function definition plus command payload
- Trigger Bash execution through SSH, HTTP CGI, or other entry points
- Execute arbitrary commands to establish persistence or escalate privileges
- Pivot to additional systems or exfiltrate data
How to detect it
Review web server access logs, SSH daemon logs, and DHCP client logs for environment variable assignments containing function-like strings followed by commands; examine process execution histories for unexpected shell invocations triggered by environment variables; correlate with known threat actor patterns documented in public exploitation reports.
- () { :;};
- env x='() { :;};
- bash -c
- ForceCommand.*bash
What your security team should do
- Immediately apply available patches to all internet-facing systems given KEV status and high EPSS
- Audit and restrict use of CGI scripts, SSH configurations, and DHCP clients that pass untrusted environment data to Bash
- Implement network segmentation and monitoring for anomalous process spawns from environment-triggered shells
- Prioritize remediation on high-value assets due to historical exploitation by threat actors
The record
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, aka "ShellShock." NOTE: the original fix for this issue was incorrect; CVE-2014-7169 has been assigned to cover the vulnerability that is still present after the incorrect fix.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | bash | 0 | 4.3-9.1 |
| Debian:12 | bash | 0 | 4.3-9.1 |
| Debian:13 | bash | 0 | 4.3-9.1 |
| Debian:14 | bash | 0 | 4.3-9.1 |
| Debian:6.0 | bash | 0 | 4.1-3+deb6u1 |
| Debian:7 | bash | 0 | 4.2+dfsg-0.1+deb7u1 |
| Mageia:3 | bash | 0 | 4.2-48.1.mga3 |
| Mageia:4 | bash | 0 | 4.2-48.1.mga4 |
| Red Hat:enterprise_linux:5::client | bash | 0 | 0:3.2-33.el5.1 |
| Red Hat:enterprise_linux:5::client | bash-debuginfo | 0 | 0:3.2-33.el5.1 |
| Red Hat:enterprise_linux:5::server | bash | 0 | 0:3.2-33.el5.1 |
| Red Hat:enterprise_linux:5::server | bash-debuginfo | 0 | 0:3.2-33.el5.1 |
| Red Hat:enterprise_linux:6::client | bash | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::client | bash-debuginfo | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::client | bash-doc | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::computenode | bash | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::computenode | bash-debuginfo | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::computenode | bash-doc | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::server | bash | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::server | bash-debuginfo | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::server | bash-doc | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::workstation | bash | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::workstation | bash-debuginfo | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:6::workstation | bash-doc | 0 | 0:4.1.2-15.el6_5.1 |
| Red Hat:enterprise_linux:7::client | bash | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::client | bash-debuginfo | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::client | bash-doc | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::computenode | bash | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::computenode | bash-debuginfo | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::computenode | bash-doc | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::server | bash | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::server | bash-debuginfo | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::server | bash-doc | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::workstation | bash | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::workstation | bash-debuginfo | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:enterprise_linux:7::workstation | bash-doc | 0 | 0:4.2.45-5.el7_0.2 |
| Red Hat:rhel_els:4::as | bash | 0 | 0:3.0-27.el4.2 |
| Red Hat:rhel_els:4::as | bash-debuginfo | 0 | 0:3.0-27.el4.2 |
| Red Hat:rhel_els:4::es | bash | 0 | 0:3.0-27.el4.2 |
| Red Hat:rhel_els:4::es | bash-debuginfo | 0 | 0:3.0-27.el4.2 |
| Red Hat:rhel_eus:5.9 | bash | 0 | 0:3.2-32.el5_9.2 |
| Red Hat:rhel_eus:5.9 | bash-debuginfo | 0 | 0:3.2-32.el5_9.2 |
| Red Hat:rhel_eus:6.4::computenode | bash | 0 | 0:4.1.2-15.el6_4.1 |
| Red Hat:rhel_eus:6.4::computenode | bash-debuginfo | 0 | 0:4.1.2-15.el6_4.1 |
| Red Hat:rhel_eus:6.4::computenode | bash-doc | 0 | 0:4.1.2-15.el6_4.1 |
| Red Hat:rhel_eus:6.4::server | bash | 0 | 0:4.1.2-15.el6_4.1 |
| Red Hat:rhel_eus:6.4::server | bash-debuginfo | 0 | 0:4.1.2-15.el6_4.1 |
| Red Hat:rhel_eus:6.4::server | bash-doc | 0 | 0:4.1.2-15.el6_4.1 |
| Red Hat:rhel_mission_critical:5.6 | bash | 0 | 0:3.2-24.el5_6.1 |
| Red Hat:rhel_mission_critical:5.6 | bash-debuginfo | 0 | 0:3.2-24.el5_6.1 |
| Red Hat:rhel_mission_critical:6.2::server | bash | 0 | 0:4.1.2-9.el6_2.1 |
| Red Hat:rhel_mission_critical:6.2::server | bash-debuginfo | 0 | 0:4.1.2-9.el6_2.1 |
| Red Hat:rhel_mission_critical:6.2::server | bash-doc | 0 | 0:4.1.2-9.el6_2.1 |
| Red Hat:rhel_sjis:5 | bash | 0 | 0:3.2-33.el5_11.1.sjis.1 |
| Red Hat:rhel_sjis:5 | bash-debuginfo | 0 | 0:3.2-33.el5_11.1.sjis.1 |
| Red Hat:rhel_sjis:6 | bash | 0 | 0:4.1.2-15.el6_5.1.sjis.1 |
| Red Hat:rhel_sjis:6 | bash-debuginfo | 0 | 0:4.1.2-15.el6_5.1.sjis.1 |
| Red Hat:rhel_sjis:6 | bash-doc | 0 | 0:4.1.2-15.el6_5.1.sjis.1 |
| Red Hat:rhev_manager:3 | rhev-hypervisor6 | 0 | 0:6.5-20140930.1.el6ev |
| Ubuntu:14.04:LTS | bash | 0 | 4.3-7ubuntu1.1 |
| openSUSE:Tumbleweed | bash | 0 | 7.0-92.1 |
Related vulnerabilities
- CVE-2022-3715 A flaw was found in the bash package, where a heap-buffer overflow can occur in valid… Also affects bash
- CVE-2016-0634 The expansion of '\h' in the prompt string in bash 4.3 allows remote authenticated users… Also affects bash
- CVE-2014-6278 GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the… Also affects bash
- CVE-2014-7187 Off-by-one error in the read_token_word function in parse.y in GNU Bash through 4.3… Also affects bash
- CVE-2014-7186 The redirection implementation in parse.y in GNU Bash through 4.3 bash43-026 allows… Also affects bash
- CVE-2014-6277 GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the… Also affects bash
- CVE-2014-7169 GNU Bash through 4.3 bash43-025 processes trailing strings after certain malformed… Also affects bash
- CVE-2014-1568 Mozilla Network Security Services (NSS) before 3.16.2.1, 3.16.x before 3.16.5, and 3.17.x… Also affects rhev-hypervisor6