<!--X-Body-Begin-->
<!--X-User-Header-->
oss-sec
mailing list archives
<!--X-User-Header-End-->
<!--X-TopPNI-->
By Date
By Thread
</form>
<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
CVE-2023-49284: fish command substitution output can trigger shell expansion
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
From: Alan Coopersmith <alan.coopersmith () oracle com>
Date: Fri, 8 Dec 2023 10:54:02 -0800
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
https://github.com/fish-shell/fish-shell/security/advisories/GHSA-2j9r-pm96-wp4f
reports:
Package: fish-shell
Affected versions: < 3.6.2
Patched versions: 3.6.2
CVSS: 3.9 (CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:L)
CVE ID: CVE-2023-49284
Impact:
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.
Consider the following:
In foo.py:
print("\ufdd2HOME") # Perhaps this value is retrieved from a database or
external source
At the shell:
> echo $(python3 foo.py)
/home/fishuser
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.
Patches:
fish shell 3.6.2 has been released to correct this issue.
--
-Alan Coopersmith- alan.coopersmith () oracle com
Oracle Solaris Engineering - https://blogs.oracle.com/solaris
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
By Date
By Thread
Current thread:
CVE-2023-49284: fish command substitution output can trigger shell expansion Alan Coopersmith (Dec 08)
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->