GNU Bash up to 3.2.48 Environment Variable variables.c Shellshock os command injection

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
9.6$0-$5k0.09

A vulnerability was found in GNU Bash and classified as very critical. This issue affects some unknown functionality of the file variables.c of the component Environment Variable Handler. The manipulation of the argument Environment with an unknown input leads to a os command injection vulnerability (Shellshock). Using CWE to declare the problem leads to CWE-78. The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. Impacted is confidentiality, integrity, and availability. The summary by CVE is:

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.

The weakness was published 09/24/2014 by Stephane Chazelas as remote code execution through bash as confirmed mailinglist post (oss-sec). The advisory is shared at seclists.org. The mailinglist post contains:

Chet Ramey, the GNU bash upstream maintainer, will soon release official upstream patches.
Robert Graham claims in his blog post that "[b]ash bug as big as Heartbleed". The identification of this vulnerability is CVE-2014-6271 since 09/09/2014. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. Technical details as well as a public exploit are known. The price for an exploit might be around USD $0-$5k at the moment (estimation calculated on 04/22/2024). MITRE ATT&CK project uses the attack technique T1202 for this issue. Due to its background and reception, this vulnerability has a historic impact. The advisory points out:
(...) a vulnerability in bash, related to how environment variables are processed: trailing code in function definitions was executed, independent of the variable name.
This vulnerability does affect web services (shell scripts as part of a CGI setup) in general. But also SSH, DHCP clients, CUPS and sudo setups are affected.

A public exploit has been developed by Huzaifa Sidhpurwala in Bash and been published immediately after the advisory. The exploit is available at securityblog.redhat.com. It is declared as highly functional. We expect the 0-day to have been worth approximately $100k and more. The vulnerability scanner Nessus provides a plugin with the ID 77970 (Qmail Remote Command Execution via Shellshock), which helps to determine the existence of the flaw in a target environment. It is assigned to the family SMTP problems. The analysis with Nessus happens with this NASL code:

if (rpm_check(release:"ALA", reference:"bash-4.1.2-15.19.amzn1")) flag++;
if (rpm_check(release:"ALA", reference:"bash-debuginfo-4.1.2-15.19.amzn1")) flag++;
if (rpm_check(release:"ALA", reference:"bash-doc-4.1.2-15.19.amzn1")) flag++;

if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
  else security_hole(0);
  exit(0);
}
The commercial vulnerability scanner Qualys is able to test this issue with plugin 370037 (Citrix XenServer Security Update (CTX200223)). The code used by the exploit is:
env x='() { :;}; echo vulnerable' bash -c "echo this is a test"
The CISA Known Exploited Vulnerabilities Catalog lists this issue since 01/28/2022 with a due date of 07/28/2022:
Apply updates per vendor instructions.

Applying a patch is able to eliminate this problem. The bugfix is ready for download at bugzilla.novell.com. The problem might be mitigated by replacing the product with Shell as an alternative. The best possible mitigation is suggested to be patching the affected component. A possible mitigation has been published even before and not after the disclosure of the vulnerability. Red Hat posted several mod_security rules which help to prevent exploitation of this vulnerability. It is also possible to enforce such a limitation with an IPTables rule: "iptables using -m string --hex-string '|28 29 20 7B|'" Attack attempts may be identified with Snort ID 31975. In this case the pattern () { is used for detection. Furthermore it is possible to detect and prevent this kind of attack with TippingPoint and the filter 16800.

The vulnerability is also documented in the databases at X-Force (96209), Tenable (77970) and Exploit-DB (34765). access.redhat.com is providing further details.

Affected

  • Apple iPhone (Jailbreak only)
  • Apple Mac OS X up to 10.9.4
  • Debian GNU/Linux up to 4.1-3/4.2
  • F5 BIG-IP up to 11.6.0
  • Madravia Linux 1.0
  • Palo Alto PAN-OS up to 6.0
  • Red Hat Linux 4/5/6/7
  • Slackware Linux up to 14.1
  • SuSE openSUSE 11.0
  • Ubuntu Linux up to 14.04 LTS
  • VMware Fusion

Not Affected

  • Android Default Installation
  • FreeBSD Default Installation
  • NetBSD Default Installation
  • OpenBSD Default Installation

Productinfo

Vendor

Name

Version

License

CPE 2.3info

CPE 2.2info

Screenshot

Video

Youtube: Not available anymore

CVSSv4info

VulDB CVSS-B Score: 🔍
VulDB CVSS-BT Score: 🔍
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 9.8
VulDB Meta Temp Score: 9.6

VulDB Base Score: 9.8
VulDB Temp Score: 9.4
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 9.8
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Name: Shellshock
Class: Os command injection / Shellshock
CWE: CWE-78 / CWE-74 / CWE-707
CAPEC: 🔍
ATT&CK: 🔍

Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Highly functional
Author: Huzaifa Sidhpurwala
Reliability: 🔍
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

KEV Added: 🔍
KEV Due: 🔍
KEV Remediation: 🔍
KEV Ransomware: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Nessus ID: 77970
Nessus Name: Qmail Remote Command Execution via Shellshock
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍

OpenVAS ID: 871250
OpenVAS Name: RedHat Update for bash RHSA-2014:1306-01
OpenVAS File: 🔍
OpenVAS Family: 🔍

Saint ID: exploit_info/bash_shellshock_cups
Saint Name: Bash Environment Variable Handling Shell Command Injection Via CUPS

Qualys ID: 🔍
Qualys Name: 🔍

MetaSploit ID: apache_mod_cgi_bash_env.rb
MetaSploit Name: Apache ActiveMQ Directory Traversal
MetaSploit File: 🔍

Exploit-DB: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Patch
Status: 🔍

0-Day Time: 🔍
Exploit Delay Time: 🔍

Patch: bugzilla.novell.com
Alternative: Shell

Snort ID: 31975
Snort Message: Volex – Possible CVE-2014-6271 bash Vulnerability Requested (header)
Snort Class: 🔍
Snort Pattern: 🔍

Suricata ID: 2014092401
Suricata Class: 🔍
Suricata Message: 🔍

TippingPoint: 🔍

McAfee IPS: 🔍
McAfee IPS Version: 🔍

ISS Proventia IPS: 🔍
Fortigate IPS: 🔍

Timelineinfo

09/09/2014 🔍
09/17/2014 +8 days 🔍
09/24/2014 +7 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/24/2014 +0 days 🔍
09/25/2014 +1 days 🔍
09/25/2014 +0 days 🔍
09/29/2014 +4 days 🔍
03/16/2016 +534 days 🔍
04/22/2024 +2959 days 🔍

Sourcesinfo

Vendor: gnu.org

Advisory: remote code execution through bash
Researcher: Stephane Chazelas
Status: Confirmed
Confirmation: 🔍

CVE: CVE-2014-6271 (🔍)
OVAL: 🔍
IAVM: 🔍

X-Force: 96209 - GNU Bash variables command execution, High Risk
SecurityTracker: 1030890 - GNU bash Environment Variable Processing Flaw Lets Users Execute Arbitrary Code
Vulnerability Center: 57351 - GNU Bash through 4.3 Remote Code Execution via a Crafted Environment - CVE-2014-6271, Critical
SecurityFocus: 70137 - GNU Bash CVE-2014-7169 Incomplete Fix Remote Code Execution Vulnerability
Secunia: 61541 - GNU Bash Shell Function Definitions OS Commands Injection Vulnerability
OSVDB: 112004 - GNU bash Environment Variable Handling Shell Command Injection

scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍

Entryinfo

Created: 09/24/2014 23:14
Updated: 04/22/2024 17:03
Changes: 09/24/2014 23:14 (84), 10/10/2018 12:48 (56), 02/20/2022 23:50 (2), 02/21/2022 00:01 (17), 02/21/2022 00:12 (1), 04/22/2024 17:03 (28)
Complete: 🔍
Cache ID: 3:761:103

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!