Repository navigation
A security release: upgrade if an agent can call the database, backup or deploy tools on a server you care about.
A database name that starts with - was one correctly quoted word and still an option to the database client
(GHSA-mwc5-p6j7-hh4q,
high, reported by @usdnr-dotcom). --execute=… makes mysql ignore its standard input, which is where the
read-only transaction of ssh_db_query is sent, so the statement ran with write access; --init-command=… runs
before anything on standard input, with the same result; --host=… sends the connection, and its password,
elsewhere. ssh_db_list, which is allowed on readonly and restricted servers, takes the same name. Releases
from 3.0.0, which added the database tools, are affected.
Fixed
- A tool argument that starts with
-is refused wherever a command would read it as an option. Quoting keeps the shell from interpreting a value; it cannot keep the program from doing so. The database tools (ssh_db_query,ssh_db_list,ssh_db_dump,ssh_db_import, and the backup, restore and scheduled-backup tools) refuse such a database name, table, import or restore file and backup directory; the file backup refuses such a path (tar's--checkpoint-actionruns a command);ssh_deployrefuses such a target;ssh_service_statussuch a service name; andssh_tailsuch a file. A relative path can still be written./-name. - A PostgreSQL or MongoDB database name that is a connection string is refused too.
psql,pg_dumpandpg_restoreread a name containing=or starting withpostgresql://as a whole connection string, and the mongo shell readshost/name: either could send the connection, and the password, to another host. - Control characters (a line break, NUL, an escape) are refused in the same values.
Changed
- A
chmodmode orchownowner given tossh_deployis now read as a value, never as an option (chmod -- -w fileworks). Agrepfilter given tossh_tailorssh_process_managerthat starts with-is now a pattern, not an option (grep -e). - What does not change: a database, table, file or directory name that does not start with
-builds exactly the command it built before.
Install or update: npm install -g mcp-ssh-manager@4.4.3 (or npm update -g mcp-ssh-manager), or download the desktop application below; the 4.x application updates itself.