You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PasswordExecCommand silently ignored for shared-server non-owners in SERVER_MODE despite ENABLE_SERVER_PASS_EXEC_CMD=True (regression in 9.15) #10249
Since 9.15 (PR #9830 / CVE-2026-7813), manager.passexec is unconditionally set to None for any non-owner of a shared server in connection_manager() and _restore_connections_from_session() in web/pgadmin/utils/driver/psycopg3/__init__.py:
ifconfig.SERVER_MODEandserver_data.sharedand \
server_data.user_id!=current_user.id:
manager.passexec=None# PasswordExecCommand never runs
This silently breaks any container deployment that:
Uses PGADMIN_SERVER_JSON_FILE / servers.json with "Shared": true to pre-configure servers for all OAuth users
Sets "PasswordExecCommand" in the server definition to supply the shared DB user's password
Has PGADMIN_CONFIG_ENABLE_SERVER_PASS_EXEC_CMD=True explicitly configured by the system administrator
The ENABLE_SERVER_PASS_EXEC_CMD config flag is now meaningless for shared servers — it is checked on startup/UI but the suppression in connection_manager fires regardless, with no log message or error surfaced to the user. The connection silently has no password.
Expected behaviour
When ENABLE_SERVER_PASS_EXEC_CMD=True is explicitly set by the system administrator, PasswordExecCommand should be honoured for shared-server non-owners. The system admin has consciously opted into this feature and is responsible for the command's content — the privilege-escalation concern (malicious owner targeting users) does not apply when the admin and the server owner are the same entity (i.e., the deployment administrator).
A reasonable middle ground: honour passexec_cmd from the SharedServer record (already added as a column in #9835) for non-owners, while still blocking inheritance from the owner's Server record. Currently _owner_only_fields prevents non-owners from ever setting passexec_cmd on their SharedServer via the API, and create_shared_server() seeds it as None, making the new column unreachable.
servers.json contains a server entry with "Shared": true and "PasswordExecCommand": "<cmd>"
Log in as any non-admin OAuth user
Attempt to connect to the shared server
Result: The exec command is never run; the connection has no password and fails (or prompts interactively). Expected: The exec command runs and supplies the password, as it did in 9.14.
Relevant source locations
web/pgadmin/utils/driver/psycopg3/__init__.py — connection_manager() and _restore_connections_from_session(): unconditional manager.passexec = None for non-owners
web/pgadmin/browser/server_groups/servers/__init__.py — _set_valid_attr_value(): _owner_only_fields blocks non-owners from setting passexec_cmd on their SharedServer
web/pgadmin/browser/server_groups/servers/__init__.py — create_shared_server(): seeds passexec_cmd=None with no path to set it legitimately
Fixed, in a different form, by #10506 (c41b606), which will be in the next release. Free-text PasswordExecCommand is no longer run in server mode, and ENABLE_SERVER_PASS_EXEC_CMD is deprecated and ignored. Instead the administrator lists permitted commands in SERVER_PASSEXEC_COMMANDS; they run without a shell with a reduced environment, and get the connection details and the pgAdmin user's identity in PGADMIN_PASSEXEC_* variables. Users of a shared server inherit the owner's named command by default and can pick their own or none, which covers the servers.json case you describe. servers.json carries the command by name, and existing free-text values that exactly match a configured command are converted on first start. Details are in the server dialog documentation.
Activity
fix: honour a shared-server non-owner's own PasswordExecCommand
fix: honour a shared-server non-owner's own PasswordExecCommand
docs: note that shared-server users set their own password exec command
dpage commentedon Oct 13, 2026
Fixed, in a different form, by #10506 (c41b606), which will be in the next release. Free-text
PasswordExecCommandis no longer run in server mode, andENABLE_SERVER_PASS_EXEC_CMDis deprecated and ignored. Instead the administrator lists permitted commands inSERVER_PASSEXEC_COMMANDS; they run without a shell with a reduced environment, and get the connection details and the pgAdmin user's identity inPGADMIN_PASSEXEC_*variables. Users of a shared server inherit the owner's named command by default and can pick their own or none, which covers the servers.json case you describe.servers.jsoncarries the command by name, and existing free-text values that exactly match a configured command are converted on first start. Details are in the server dialog documentation.