pgAdmin 4 versions prior to 9.19 allow users to specify a binary path for pg_dump, pg_restore, pg_dumpall, and psql. In server mode, the application only restricted binary paths under the per-user storage directory but not under shared storage directories accessible by ordinary users. This flaw allowed a user to upload a malicious executable to shared storage, set the binary path to it, and have pgAdmin run it with the operating system privileges of the pgAdmin process. The issue is particularly exploitable on Windows servers where files with executable names can run even if created through pgAdmin. The vulnerability was fixed by expanding path checks to include all shared storage directories, resolving symbolic links, normalizing paths, rejecting paths with NUL characters, and enforcing these checks consistently.