CVE-2016-7543
High · 8.4CVSS
8.4
EPSS
0.6%
Published
Jan 19, 2017
CISA due date
—
Cloudanix analysis
A flaw in the command-line program lets someone already logged into the computer run any commands they want with full system control.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Local users can inject arbitrary commands into Bash startup via crafted SHELLOPTS and PS4 environment variables, resulting in execution with root privileges.
Why it matters to the business
Attackers who already have a local foothold can fully compromise the system, leading to unauthorized data access, persistence, or lateral movement across the environment.
How an attack unfolds
An attacker with local access sets malicious values in the SHELLOPTS and PS4 environment variables before invoking Bash; when the shell initializes, the crafted variables cause command injection that executes with elevated root privileges. Threat actor references to GNU Bash OS Command Injection Vulnerability indicate known exploitation patterns in this family.
How to fix it
Upgrade GNU Bash to version 4.4 or later on all affected systems including Fedora packages; where upgrades are unavailable, restrict local user access and sanitize environment variables before shell invocation.
How to confirm the fix worked
Verify installed Bash version is 4.4 or newer; attempt reproduction of the flaw with controlled SHELLOPTS and PS4 values in a test environment to confirm the vulnerability is absent.
Typical attack path
- Obtain local user access on the target system
- Craft and export malicious SHELLOPTS and PS4 environment variables
- Trigger Bash execution under a privileged context
- Execute arbitrary commands as root
How to detect it
Inspect process environment listings, shell initialization logs, and audit trails for unusual SHELLOPTS or PS4 values; correlate with root-level command execution from non-root users.
- SHELLOPTS=.*xtrace
- PS4=.*\$\(command\)
- env.*SHELLOPTS.*PS4.*root
What your security team should do
- Prioritize patching all instances of GNU Bash to version 4.4+ given the multi-year exposure window
- Audit local access controls and limit untrusted user accounts on systems running Bash
- Implement environment variable filtering or sandboxing for privileged shell invocations
- Review historical logs for indicators of prior exploitation attempts
The record
Bash before 4.4 allows local users to execute arbitrary commands with root privileges via crafted SHELLOPTS and PS4 environment variables.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | bash | 0 | 4.4-1 |
| Debian:12 | bash | 0 | 4.4-1 |
| Debian:13 | bash | 0 | 4.4-1 |
| Debian:7 | bash | 0 | 4.2+dfsg-0.1+deb7u4 |
| Mageia:5 | bash | 0 | 4.3-48.2.mga5 |
| Red Hat:enterprise_linux:6::client | bash | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::client | bash-debuginfo | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::client | bash-doc | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::computenode | bash | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::computenode | bash-debuginfo | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::computenode | bash-doc | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::server | bash | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::server | bash-debuginfo | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::server | bash-doc | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::workstation | bash | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::workstation | bash-debuginfo | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:6::workstation | bash-doc | 0 | 0:4.1.2-48.el6 |
| Red Hat:enterprise_linux:7::client | bash | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::client | bash-debuginfo | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::client | bash-doc | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::computenode | bash | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::computenode | bash-debuginfo | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::computenode | bash-doc | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::server | bash | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::server | bash-debuginfo | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::server | bash-doc | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::workstation | bash | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::workstation | bash-debuginfo | 0 | 0:4.2.46-28.el7 |
| Red Hat:enterprise_linux:7::workstation | bash-doc | 0 | 0:4.2.46-28.el7 |
| SUSE:Enterprise Storage 4 | bash | 0 | 4.3-83.10.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | bash | 0 | 4.2-82.1 |
| SUSE:Linux Enterprise Desktop 12 SP3 | bash | 0 | 4.3-83.10.1 |
| SUSE:Linux Enterprise Server 11 SP4 | bash | 0 | 3.2-147.29.1 |
| SUSE:Linux Enterprise Server 12 SP1 | bash | 0 | 4.2-82.1 |
| SUSE:Linux Enterprise Server 12 SP2-BCL | bash | 0 | 4.3-83.10.1 |
| SUSE:Linux Enterprise Server 12 SP2-LTSS | bash | 0 | 4.3-83.10.1 |
| SUSE:Linux Enterprise Server 12 SP3 | bash | 0 | 4.3-83.10.1 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | bash | 0 | 3.2-147.29.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | bash | 0 | 4.2-82.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | bash | 0 | 4.3-83.10.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP3 | bash | 0 | 4.3-83.10.1 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | bash | 0 | 3.2-147.29.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | bash | 0 | 4.2-82.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | bash | 0 | 4.3-83.10.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP1 | bash | 0 | 4.2-82.1 |
| SUSE:Linux Enterprise Workstation Extension 12 SP3 | bash | 0 | 4.3-83.10.1 |
| SUSE:OpenStack Cloud 7 | bash | 0 | 4.3-83.10.1 |
| Ubuntu:14.04:LTS | bash | 0 | 4.3-7ubuntu1.7 |
| Ubuntu:16.04:LTS | bash | 0 | 4.3-14ubuntu1.2 |
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-2012-6711 A heap-based buffer overflow exists in GNU Bash before 4.3 when wide characters, not… 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-2016-9401 popd in bash might allow local users to bypass the restricted shell and cause a… 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