Skip to content

v4.4.3

Latest

Choose a tag to compare

@bvisible bvisible released this 28 Nov 17:15
· 1 commit to main since this release

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-action runs a command); ssh_deploy refuses such a target; ssh_service_status such a service name; and ssh_tail such 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_dump and pg_restore read a name containing = or starting with postgresql:// as a whole connection string, and the mongo shell reads host/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 chmod mode or chown owner given to ssh_deploy is now read as a value, never as an option (chmod -- -w file works). A grep filter given to ssh_tail or ssh_process_manager that 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.