Skip to content
RCE Disclosed report Intermediate CVE-2014-6271

GNU Bourne-Again Shell (Bash) 'Shellshock' Vulnerability

GNU Bash versions 1.14 through 4.3 process commands placed after function definitions in environment variables, allowing remote attackers to execute arbitrary code via a crafted environment. This enables network-based exploitation.

stephane-chazelas Follow

Originally disclosed on HackerOne

  • Fixed in 7 days
  • Paid in 10 days
  • Disclosed after 7 days

GNU Bash versions 1.14 through 4.3 contain a flaw that processes commands placed after function definitions in the added environment variable, allowing remote attackers to execute arbitrary code via a crafted environment which enables network-based exploitation.

Original disclosure: http://www.openwall.com/lists/oss-security/2014/09/24/11

Detailed analysis by lcamtuf:

The original report as published on HackerOne, by stephane-chazelas. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, Bash failed to properly validate the contents of environment variables that define functions, executing trailing commands instead of treating them as data.

Impact

Remote attackers could execute arbitrary code on vulnerable systems.

What the attacker needed

Control over an environment variable

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Bash is a common command-line shell on Linux and Unix systems. It can store functions (reusable command blocks) in environment variables, which are passed to programs. The bug is that Bash would also run any extra commands appended after such a function definition, so an attacker who can control an environment variable could make the system run their commands.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.