# CVE-2023-49284: Command substitution output can trigger shell expansion in fish shell

> Attackers can trigger shell expansion via command substitution output, potentially causing denial of service or information disclosure in fish shell.

- **Severity:** Low 3.9 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 4 Dec 2023
- **Updated:** 13 Feb 2025
- **Also known as:** AZL-32081, DEBIAN-CVE-2023-49284, GHSA-2j9r-pm96-wp4f, MGASA-2023-0344, OESA-2023-1933, OESA-2023-1938, OESA-2023-1939, OESA-2023-1940, ROOT-OS-ALPINE-317-CVE-2023-49284, ROOT-OS-ALPINE-318-CVE-2023-49284, UBUNTU-CVE-2023-49284, openSUSE-SU-2023:0404-1, openSUSE-SU-2023:0405-1, openSUSE-SU-2024:13501-1

## What is CVE-2023-49284?

CVE-2023-49284 is a low-severity vulnerability in fish-shell, published on 4 Dec 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. fish shell uses certain Unicode non-characters internally for marking wildcards and expansions. It will incorrectly allow these markers to be read on command substitution output, rather than transforming them into a safe internal representation. While this may cause unexpected behavior with direct input (for example, echo \UFDD2HOME has the same output as echo $HOME), this may become a minor security problem if the output is being fed from an external program into a command substitution where this output may not be expected. This design flaw was introduced in very early versions of fish, predating the version control system, and is thought to be present in every version of fish released in the last 15 years or more, although with different characters. Code execution does not appear to be possible, but denial of service (through large brace expansion) or information disclosure (such as variable expansion) is potentially possible under certain circumstances. fish shell 3.6.2 has been released to correct this issue. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-436 (Interpretation Conflict)

## Which versions are affected by CVE-2023-49284?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `fish` | SUSE:Package Hub 15 SP4 | All versions | 3.3.1-bp154.3.3.1 |
| `fish` | SUSE:Package Hub 15 SP5 | All versions | 3.3.1-bp155.4.3.1 |
| `fish` | openSUSE:Leap 15.4 | All versions | 3.3.1-bp154.3.3.1 |
| `fish` | openSUSE:Leap 15.5 | All versions | 3.3.1-bp155.4.3.1 |
| `fish` | openSUSE:Tumbleweed | All versions | 3.6.4-1.1 |

Products: Fishshell Fish.

## How do I fix CVE-2023-49284?

Upgrade to a fixed version.

## Is CVE-2023-49284 being exploited?

There is no known exploitation of CVE-2023-49284 in the wild and no public exploit code.

## Other vulnerabilities in fish-shell

- [CVE-2014-2914](https://insights.sbomify.com/CVE-2014-2914/): Code injection in n/a (critical 9.8)
- [CVE-2014-2906](https://insights.sbomify.com/CVE-2014-2906/): Race condition in n/a (high 7.0)
- [CVE-2014-3856](https://insights.sbomify.com/CVE-2014-3856/): Race condition in n/a (high 7.0)
- [CVE-2014-2905](https://insights.sbomify.com/CVE-2014-2905/): Privilege escalation in n/a (medium 6.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-49284 and fix it if it is affected.

What it is: CVE-2023-49284 is a low-severity vulnerability in fish-shell, published on 4 Dec 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-49284 in the wild and no public exploit code.

Affected product: fish-shell. 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-2023-49284/ (Markdown: https://insights.sbomify.com/CVE-2023-49284/index.md)
```

## Sources

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

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