Repository navigation
v4.3.5
A security release: upgrade if a server uses restricted or readonly mode. A
command a DENY_PATTERNS entry (or the readonly list) names could still run behind an
allowed launcher such as find -exec or xargs, because the shell rewrites a word
before it runs it
(GHSA-4fp4-fggm-cf5c,
high). Every release from 3.5.0, where the security modes were added, is affected.
Two things behave differently on purpose: restricted mode now refuses $_,
brace expansions and a command whose own name has a quote, a backslash, a variable
or a glob; readonly mode refuses $_ and reads a name after /bin/ or /sbin/, so
ls -l /usr/bin/su is refused there (details below). Nothing else changes (the release pipeline upgrades 3.8.5,
3.8.6, 3.8.7, every 4.0.x, 4.1.0, 4.2.0, 4.3.0, 4.3.1, 4.3.2, 4.3.3 and 4.3.4 from the
registry to this version and back).
The Windows installer is still not Authenticode-signed, for the same reason
as 4.0.0: Windows shows "Windows protected your PC", More info → Run anyway,
and ssh-manager app checks the installer against the SHA-256 in
release-manifest-win32.json. macOS builds are signed and notarized.
Security
- A command a
DENY_PATTERNSentry names could still run, behind an allowed
launcher (GHSA-4fp4-fggm-cf5c,
reported by Pythame). The patterns, and the built-in list ofreadonly, were
tested on the text as typed, and a shell does not run that text:r\<newline>m,
r${x}m(x unset),r""m,r\mand"r"mare allrm. With^findallowed and
\brm\bdenied,find . -exec r""m -rf x {} +was allowed and deleted the target.
Every command is now also tested as the shell reads it: quotes, backslashes and
line continuations removed, variables read as unset and as blanks,${x:-word}as
its word, braces expanded, and the name of the command without its directory.
Found with a differential check against sh, dash, bash, ksh and zsh (1,500 random
spellings ofrmbehindfind,xargsandenv), which is now part of the tests. - Fixed alongside:
/usr/bin/rmandfind -exec /bin/rmwere not seen by the
readonlylist; a command name written with a quote or a variable (ls""x) matched
an allow pattern for another name than the one the shell ran.
Changed
restrictedmode now refuses what a line can use to spell a name:$_,
brace expansions ({a,b},{1..3}) and a command whose own name has a quote,
a backslash, a variable or a glob ("ls" -l,\ls). Arguments are not affected
(ls "/var/log",echo $HOME,find . -name "*.log").readonlymode refuses$_, and reads a name after/bin/or/sbin/:
ls -l /usr/bin/suis now refused. A quoted argument is still an argument
(grep "kill -9" /var/log/syslogruns); a quoted command name is not ("rm" -rf x).- A glob or an interpreter is still out of reach of a deny pattern. The security
modes document lists what an allow pattern should not admit.
Install or update: npm install -g mcp-ssh-manager@4.3.5 (or npm update -g mcp-ssh-manager), or download the desktop application below; the 4.x application updates itself.