CVE-2026-116249

pgAdmin 4: Connection file paths and parameter keys escape the user's storage directory

Published Oct 30, 2026 CVSS 4.0 · 7.2 High EPSS < 1% KEV · Not listed
Description
In server mode pgAdmin 4 resolves a server's password file, SSL certificate, key, CRL and SSH tunnel identity file relative to the user's storage directory, but get_complete_file_path() only stripped leading slashes before joining the two. A path such as "../<another user>/.pgpass", set through the server dialog, the REST API or a servers.json import, therefore named another user's file, and connecting used that user's saved passwords, client certificate or SSH key. The sslkeylogfile connection parameter was passed to libpq unchanged, so a path outside storage let libpq create or append a file as the account running pgAdmin.

make_conninfo() also quoted connection parameter values but not their names, so a crafted parameter name could smuggle additional keyword=value pairs past these checks.

The fix requires the resolved path, with symbolic links followed, to stay inside the user's storage directory or the named shared storage directory, confines sslkeylogfile the same way, and accepts only exact libpq keywords as connection parameter names. A refused path or keyword is reported instead of letting libpq fall back to a default.

This issue affects pgAdmin 4: before 9.19.

Analysis

AI-generated

Technical impact

The flaw lies in pgAdmin 4’s server mode file resolution logic. The get_complete_file_path function only strips leading slashes before concatenating the supplied path with the user’s storage directory. A user can set paths such as "../.pgpass" for a server’s password file, SSL certificate, key, CRL, or SSH identity file. When such a relative path is processed, it resolves to another user's configuration file or even a file outside the storage area, allowing that file to be read or written by the pgAdmin process. In addition, the sslkeylogfile parameter is forwarded to libpq unchanged, so an attacker can place a path that causes libpq to create or append a file as the pgAdmin user. The make_conninfo function quotes parameter values but not their names, enabling crafted parameter names to inject additional keyword=value pairs and bypass expected validation. The combined effect is that a user who can configure or import server definitions can read another user’s secrets, create or alter files on the filesystem, and potentially elevate privileges or tamper with other users’ data.

Affected Systems

The vulnerability impacts pgAdmin 4 versions prior to 9.19. The affected components include configuration handling via the server dialog, the REST API for server settings, and the servers.json import function. The vendor is pgadmin.org and the product is pgAdmin 4.

Risk and Exploitability

The CVSS score of 7.2 indicates a moderate to high severity. EPSS data is not available, and the vulnerability is not listed in CISA’s KEV catalog. A likely attack vector is remote; an authenticated or trusted user who can add or modify server entries can supply malicious paths. The exploitation requires no special kernel privileges, but it can lead to reading sensitive files or creating arbitrary files that may be used for further privilege escalation. The overall risk is significant for environments where multiple user accounts coexist in the same pgAdmin instance and share the storage directory.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade pgAdmin 4 to version 9.19 or later, which enforces path validation and accepts only exact libpq keyword names, preventing the traversal and injection behaviors.
  • If an upgrade is unavailable, remove the ability to import untrusted servers.json files or restrict REST API access for server configuration changes to highly trusted users; ensure that no configuration contains paths that could resolve outside the storage directory.
  • Confirm that the pgAdmin storage directory and any symbolic links it references do not point outside the intended location, and apply strict filesystem permissions to prevent unauthorized file creation or modification.

Generated by OpenCVE AI on October 30, 2026 at 21:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:pgadmin:pgadmin_4:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Pgadmin
Pgadmin pgadmin 4
Vendors & Products Pgadmin
Pgadmin pgadmin 4
Type Values Removed Values Added
Description In server mode pgAdmin 4 resolves a server's password file, SSL certificate, key, CRL and SSH tunnel identity file relative to the user's storage directory, but get_complete_file_path() only stripped leading slashes before joining the two. A path such as "../<another user>/.pgpass", set through the server dialog, the REST API or a servers.json import, therefore named another user's file, and connecting used that user's saved passwords, client certificate or SSH key. The sslkeylogfile connection parameter was passed to libpq unchanged, so a path outside storage let libpq create or append a file as the account running pgAdmin. make_conninfo() also quoted connection parameter values but not their names, so a crafted parameter name could smuggle additional keyword=value pairs past these checks. The fix requires the resolved path, with symbolic links followed, to stay inside the user's storage directory or the named shared storage directory, confines sslkeylogfile the same way, and accepts only exact libpq keywords as connection parameter names. A refused path or keyword is reported instead of letting libpq fall back to a default. This issue affects pgAdmin 4: before 9.19.
Title pgAdmin 4: Connection file paths and parameter keys escape the user's storage directory
Weaknesses CWE-22
CWE-73
References
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L'}

cvssV4_0

{'score': 7.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:L/VA:L/SC:H/SI:H/SA:N'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-73

    External Control of File Name or Path

Sources

Status
PUBLISHED
Assigner
PostgreSQL
Published
Updated
Nov 6, 2026, 4:19 PM
Reserved
Oct 25, 2026, 4:26 PM
Status
Analyzed
Published
Oct 30, 2026, 8:17 PM
Modified
Nov 9, 2026, 3:37 PM