# CVE-2014-6278: GNU Bash OS Command Injection

> Remote attackers can execute arbitrary commands via crafted environment variables due to improper parsing of function definitions in GNU Bash.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 2 Oct 2025 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 30 Sep 2014
- **Updated:** 30 Dec 2025
- **Also known as:** DEBIAN-CVE-2014-6278, GHSA-6493-28fj-f93w, UBUNTU-CVE-2014-6278

## What is CVE-2014-6278?

CVE-2014-6278 is a high-severity command injection vulnerability in n/a, published on 30 Sep 2014. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

GNU Bash through 4.3 bash43-026 does not properly parse function definitions in the values of environment variables, which allows remote attackers to execute arbitrary commands 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.  NOTE: this vulnerability exists because of an incomplete fix for CVE-2014-6271, CVE-2014-7169, and CVE-2014-6277.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2014-6278?

It affects 1 product.


Products: Gnu Bash.

## How do I fix CVE-2014-6278?

Apply the vendor's patch. US federal agencies must fix it by 23 Oct 2025.

## Is CVE-2014-6278 being exploited?

Yes. Attackers have exploited CVE-2014-6278 in the wild since at least 2 Oct 2025.

Public exploit code:

- Apache mod_cgi Bash Environment Variable Injection (Shellshock) Scanner (metasploit)
- Apache mod_cgi Bash Environment Variable Code Injection (Shellshock) (metasploit)
- CUPS Filter Bash Environment Variable Code Injection (Shellshock) (metasploit)
- dhclient 4.1 - Bash Environment Variable Command Injection (Shellshock) (exploitdb)
- GNU bash 4.3.11 - Environment Variable dhclient (exploitdb)
- Apache mod_cgi - 'Shellshock' Remote Command Injection (exploitdb)

## Other vulnerabilities in n/a

- [CVE-2014-7186](https://insights.sbomify.com/CVE-2014-7186/): Memory corruption in n/a (critical 10.0)
- [CVE-2014-7187](https://insights.sbomify.com/CVE-2014-7187/): Memory corruption in n/a (critical 10.0)
- [CVE-2014-6277](https://insights.sbomify.com/CVE-2014-6277/): Code injection in n/a (critical 10.0)
- [CVE-2022-3715](https://insights.sbomify.com/CVE-2022-3715/): Memory corruption in bash (high 7.8)
- [CVE-2019-18276](https://insights.sbomify.com/CVE-2019-18276/): Privilege escalation in n/a (high 7.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2014-6278 and fix it if it is affected.

What it is: CVE-2014-6278 is a high-severity command injection vulnerability in n/a, published on 30 Sep 2014. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: Yes. Attackers have exploited CVE-2014-6278 in the wild since at least 2 Oct 2025.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2014-6278/ (Markdown: https://insights.sbomify.com/CVE-2014-6278/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2014-6278
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2014-6278
- OSV: https://osv.dev/vulnerability/CVE-2014-6278

---
From sbomify Insights: https://insights.sbomify.com/CVE-2014-6278/
Summaries are generated and may contain mistakes; the official description above is the record.
