Cloudanix VulnDB

CVE-2012-6711

High · 7.8

CVSS

7.8

EPSS

0.5%

Published

Jun 18, 2019

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A flaw in a widely used command interpreter can let someone already logged into the computer run harmful commands or crash programs by feeding it certain special characters.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
Low
Impact
Full Compromise
Component
Application
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Heap-based buffer overflow in ansicstr() within lib/sh/strtrans.c when echo -e processes wide characters unsupported by the current LC_CTYPE locale, allowing memory corruption and potential code execution under the bash process privileges.

Why it matters to the business

Local attackers can crash scripts or gain elevated code execution on systems running vulnerable Bash, risking unauthorized access, data tampering, or service disruption especially in environments with many legacy or unpatched shells.

How an attack unfolds

An attacker with local access sets LC_CTYPE to a locale lacking wide-character support, then supplies crafted wide-character data to a script invoking the echo -e built-in, triggering the mishandled u32cconv() conversion to overflow the heap and execute arbitrary code.

How to fix it

Upgrade GNU Bash to version 4.3 or newer on all affected systems including Red Hat Enterprise Linux deployments; where immediate upgrade is impossible, restrict untrusted local accounts and audit scripts that rely on echo -e.

How to confirm the fix worked

Verify Bash version is 4.3 or later; test exposure by running echo -e with wide characters under a mismatched LC_CTYPE locale and confirming no crash or overflow occurs.

Typical attack path

  1. Obtain local shell access on the target system
  2. Configure LC_CTYPE environment variable to an incompatible locale
  3. Invoke or supply input to a Bash script that uses echo -e with wide characters
  4. Trigger the buffer overflow to corrupt memory and run attacker-controlled code

How to detect it

Review process environment variables for unusual LC_CTYPE settings combined with Bash crashes or segfaults; examine shell history and script logs for invocations of echo -e containing non-ASCII or wide characters.

  • LC_CTYPE set to locale without wide character support
  • bash segfault or heap corruption logs near echo invocations
  • echo -e commands containing \u or wide-character sequences in scripts

What your security team should do

  • Prioritize patching Bash to 4.3+ across all hosts given its universal presence in Linux environments
  • Scan for and replace any scripts using echo -e with wide-character sequences
  • Enforce least-privilege local accounts to limit exploitation surface
  • Monitor for new EPSS increases or exploit code releases despite current low scores

The record

A heap-based buffer overflow exists in GNU Bash before 4.3 when wide characters, not supported by the current locale set in the LC_CTYPE environment variable, are printed through the echo built-in function. A local attacker, who can provide data to print through the "echo -e" built-in function, may use this flaw to crash a script or execute code with the privileges of the bash process. This occurs because ansicstr() in lib/sh/strtrans.c mishandles u32cconv().

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 bash 0 4.3-1
Debian:12 bash 0 4.3-1
Debian:13 bash 0 4.3-1
SUSE:Linux Enterprise Server 12 SP1-LTSS bash 0 4.2-83.6.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP1 bash 0 4.2-83.6.1
Ubuntu:16.04:LTS bash 0 4.3-14ubuntu1.3
Ubuntu:18.04:LTS bash 0 4.4.18-2ubuntu1.1

Related vulnerabilities