CVE-2023-49284
JSON

3.9low

Command substitution output can trigger shell expansion in fish shell

Severity
3.9low CVSS:3.1 by GitHub_M
Exploit likelihood
0.47% (higher than 42% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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.

Affected

Product or packageVersionsReported by
fish-shell fish-shell< 3.6.2CVE List
fishshell fishbefore 3.6.2NVD

All scores

GitHub_M3.9low CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:L
NVD6.6medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:H

Classification

What each source says

CVE List

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.

NVD (es)

fish es un shell de línea de comandos inteligente y fácil de usar para macOS, Linux y el resto de la familia. fish shell utiliza internamente ciertos caracteres que no son Unicode para marcar comodines y expansiones. Permitirá incorrectamente que estos marcadores se lean en la salida de sustitución de comandos, en lugar de transformarlos en una representación interna segura. Si bien esto puede causar un comportamiento inesperado con la entrada directa (por ejemplo, echo \UFDD2HOME tiene el mismo resultado que echo $HOME), esto puede convertirse en un problema de seguridad menor si el resultado se envía desde un programa externo a un comando de sustitución donde este resultado puede que no se espere. Este defecto de diseño se introdujo en versiones muy tempranas de Fish, anteriores al sistema de control de versiones, y se cree que está presente en todas las versiones de Fish lanzadas en los últimos 15 años o más, aunque con caracteres diferentes. La ejecución del código no parece posible, pero la denegación de servicio (mediante una gran expansión de llaves) o la divulgación de información (como la expansión de variables) es potencialmente posible en determinadas circunstancias. Se lanzó Fish Shell 3.6.2 para corregir este problema. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-49284 changed 2025-02-13CVE Terms of Use
NVDCVE-2023-49284 changed 2026-06-17Public domain