Vulnerability in bash package - Specially crafted environment variables can result in root privilege escalation

bash Updated 02 Oct 2025

Summary

26/10/2016
N/A
Yes i
Unrated
Not published

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback