Vulnerability in bash package - Specially crafted environment variables can result in root privilege escalation
Summary
DLA-680-1: bash - security update. Affects bash versions < 4.2+dfsg-0.1+deb7u4. Fixed in 4.2+dfsg-0.1+deb7u4. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The bash package is a sh-compatible command language interpreter used as the default shell in Debian systems. It provides a wide range of functionality for executing commands and scripting. The vulnerability in question arises when the package is configured as the default shell and is combined with insecure setuid binaries. Debian 7 Wheezy, however, uses dash as the default shell and does not have any known setuid binaries with this insecure combination.
Vulnerability Detail
The vulnerability, identified as CVE-2016-7543, allows for root privilege escalation through specially crafted SHELLOPTS+PS4 environment variables. To exploit this vulnerability, an attacker would need to have a setuid binary that uses the setuid() function in combination with either the system() or popen() function. By manipulating the environment variables, an attacker can gain root access. It is important to note that this vulnerability only affects systems where bash is the default shell and the setuid binary has the insecure combination. Debian 7 Wheezy is not vulnerable to this issue.
How To Fix
Minimum fixed version
4.2+dfsg-0.1+deb7u4
This is the first release that contains the fix.
sudo apt-get install --only-upgrade bash
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability.
Conclusion
The vulnerability in the bash package allows for root privilege escalation through specially crafted environment variables. Debian 7 Wheezy is not affected by this issue, but other systems where bash is the default shell and there are setuid binaries using the insecure combination may be vulnerable. It is recommended to upgrade the bash package and ensure that any setuid binaries do not use the insecure combination. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for bash →
FAQ
Systems where bash is the default shell and there are setuid binaries using the insecure combination of setuid() with system() or popen() are vulnerable.
No, Debian 7 Wheezy uses dash as the default shell and does not have any known setuid binaries with the insecure combination.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file and it will provide real-time alerts for open-source vulnerabilities.
There are no known exploits for this vulnerability at the time of this report.
The update to the bash package will not correct the issue in the setuid binary. You will need to address this problem in the insecure setuid binary itself.
Related vulnerabilities
Recent vulnerabilities recorded for bash.