Files
ohmyzsh/tools
P1bub d42209f2af fix(installer): prevent command injection via $USER in install.sh (#13960)
HOME="${HOME:-$(eval echo ~"$USER")}" expands any shell metacharacters in
$USER when HOME is unset (CWE-78), e.g. USER='x"; <command>; "'. Validate the
username against a safe character set before running the eval and fall back
to $PWD for unsafe values. Also quote $USER in the getent call to avoid word
splitting.

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2026-08-20 10:43:07 +02:00
..