CVE-2026-116241:pgAdmin 4 Import/Export Data 允許執行外部命令的 SQL 注入漏洞
CVE-2026-116241 - pgAdmin 4: Import/Export Data query export runs a command through a backslash in a double-quoted identifier
pgAdmin 4 版本低於 9.19 的 Import/Export Data 工具存在 SQL 注入漏洞,攻擊者可執行伺服器端命令。
- 漏洞原理:利用 psql \copy 解析器與 pgAdmin 之間的引號處理差異,允許在雙引號識別符中注入 \ 以終止 \copy 佔位符並執行 TO PROGRAM。
瞭解pgAdmin 4 版本 9.19 以上已修復的 SQL 注入漏洞,並掌握如何限制非管理員的 Import/Export 許可權。
pgAdmin 4's Import/Export Data tool wraps a user's query export in a psql \copy (...) TO command and checks that the query's parentheses are balanced so that nothing can escape the wrapper. The check rejected a backslash inside a single-quoted string, but not inside a double-quoted identifier, where it treated the next double quote as closing the identifier. psql's \copy parser applies the connection's escape character to whichever quote opened a token, so with standard_conforming_strings off a backslash-escaped double quote does not close the identifier. pgAdmin's and psql's view of the quoting then diverged, a closing parenthesis hidden from the check ended the \copy (...) wrapper, and a following TO PROGRAM clause was executed by psql on the pgAdmin host, as the operating-system account running pgAdmin, before the server rejected the statement. An ordinary database role can turn standard_conforming_strings off for itself, and the Import/Export Data permission is granted to non-administrators by default. This is a bypass of the fix for CVE-2026-17566. The fix rejects any backslash inside a double-quoted identifier, as was already done for single-quoted strings, since its meaning depends on a server setting that cannot be known reliably when the query is validated. This issue affects pgAdmin 4: before 9.19.
Impact
Affected Products
The following products are affected by CVE-2026-116241
vulnerability.
Even if cvefeed.io is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
| ID | Vendor | Product | Action |
|---|---|---|---|
| 1 | Pgadmin | pgadmin_4 |
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | CRITICAL | f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 | ||||
| CVSS 3.1 | CRITICAL | MITRE-CVE | ||||
| CVSS 4.0 | CRITICAL | f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 | ||||
| CVSS 4.0 | CRITICAL | f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 |
Update pgAdmin 4 to version 9.19 or later to fix the SQL injection vulnerability.
- Update pgAdmin 4 to version 9.19 or later.
- Disable `standard_conforming_strings` setting if possible.
- Restrict Import/Export Data permissions for non-administrators.
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-116241.
| URL | Resource |
|---|---|
| https://github.com/pgadmin-org/pgadmin4/commit/9be31a019f780647fb689c458408c8803263c812 | |
| https://github.com/pgadmin-org/pgadmin4/issues/10663 |
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-116241 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-116241
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-116241 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-116241 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
New CVE Received by f86ef6dc-4d3a-42ad-8f28-e6d5547a5007
十月. 30, 2026
Action Type Old Value New Value Added Description pgAdmin 4's Import/Export Data tool wraps a user's query export in a psql \copy (...) TO command and checks that the query's parentheses are balanced so that nothing can escape the wrapper. The check rejected a backslash inside a single-quoted string, but not inside a double-quoted identifier, where it treated the next double quote as closing the identifier. psql's \copy parser applies the connection's escape character to whichever quote opened a token, so with standard_conforming_strings off a backslash-escaped double quote does not close the identifier. pgAdmin's and psql's view of the quoting then diverged, a closing parenthesis hidden from the check ended the \copy (...) wrapper, and a following TO PROGRAM clause was executed by psql on the pgAdmin host, as the operating-system account running pgAdmin, before the server rejected the statement. An ordinary database role can turn standard_conforming_strings off for itself, and the Import/Export Data permission is granted to non-administrators by default. This is a bypass of the fix for CVE-2026-17566. The fix rejects any backslash inside a double-quoted identifier, as was already done for single-quoted strings, since its meaning depends on a server setting that cannot be known reliably when the query is validated. This issue affects pgAdmin 4: before 9.19. Added CVSS V4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X Added CVSS V3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Added CWE CWE-78 Added CWE CWE-115 Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/116xxx/CVE-2026-116241.json">CVE-2026-116241</a> Added Reference https://github.com/pgadmin-org/pgadmin4/commit/9be31a019f780647fb689c458408c8803263c812 Added Reference https://github.com/pgadmin-org/pgadmin4/issues/10663
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.