CVE-2026-17566

CRITICALPre-NVD 9.99.9
EchelonGraph scoreHIGH confidence

Score 9.9 from GitHub Security Advisory (severity: CRITICAL) published 2026-07-31. a secondary CVSS source baseline 9.9; sources differ by 0.0.

Triggered by: GitHub Security Advisory CVSS
Sources: ghsa, secondary
Trending — 3 sources updated this week
9.9EG
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS PROB: CVSS: 9.9Exploit: None knownExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

pgAdmin 4's Import/Export Data tool builds a psql \copy (...) command line by interpolating a user-supplied SQL query into a Jinja template and passing the rendered line to psql via --command. To stop an attacker from breaking out of the (...) wrapper, create_import_export_job() (route POST /import_export/job/, gated only by the ordinary, commonly-granted tools_import_export_data permission) validated the query with a hand-written parenthesis-balance checker, _is_query_parens_balanced(). That checker always treated a backslash before a single quote (\') as escaping the quote, i.e. as if standard_conforming_strings were off. PostgreSQL has defaulted standard_conforming_strings to on since 9.1 (2010), the default on every PostgreSQL version pgAdmin 4 currently supports (13-18); under that default psql's own \copy tokenizer treats \ as an ordinary character, so a single quote immediately after it closes the string literal. A query such as SELECT 'a\') TO PROGRAM 'echo pwned' x' was therefore accepted as "balanced" by pgAdmin's checker (which believed the ) was still inside the string), while psql, run through the actual rendered command line, closes the string at that point and treats the following ) as the end of the wrapping \copy (...) subquery, exposing an attacker-chosen TO PROGRAM '' clause that psql executes via popen() -- independent of a subsequent syntax error later on the same line. This is the same class of bug as CVE-2025-12762/CVE-2025-13780 (RCE via psql meta-command/COPY injection during PLAIN-format dump restore), reached through an independently written defense in a different module (Import/Export Data rather than Restore) that had its own, different logic bug (inverted backslash-escape semantics rather than a BOM-defeated regex anchor).

The fix rejects any backslash inside a single-quoted string in the query outright, rather than picking one of the two possible psql interpretations. This is intentionally conservative: because the correct interpretation of \ depends on the target server's standard_conforming_strings setting, which the checker cannot reliably know at validation time, refusing the query is safer than guessing.

This issue affects pgAdmin 4: from the introduction of _is_query_parens_balanced() before 9.18.

CVSS v3
9.9
EG Score
9.9(high)
EG Risk
45(Track)
EG Risk 45/100SSVC: Track

EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).

How it’s computed
Severity99% × 45%
Exploitation0% × 40%
Automatability0% × 15%
Action: Routine — remediate on your standard cadence.
EPSS PROB
EPSS %ILE
KEV
Not listed

Published

July 31, 2026

Last Modified

August 1, 2026

Advisory Details (2)

Auto-updated Aug 1, 2026
Upstream fix merged — awaiting tagged release. Sources: github_commit.
generic

OS command injection in Import/Export Data via backslash-escape mismatch in the query guard (CVE-2026-17566) · Issue #10213 · pgadmin-org/pgadmin4 · GitHub

https://github.com/pgadmin-org/pgadmin4/issues/10213
github_commit

commit 1496fabe28c9 (pgadmin-org/pgadmin4)

Fix landed in pgadmin-org/pgadmin4 commit 1496fabe28c9 — awaiting tagged release

https://github.com/pgadmin-org/pgadmin4/commit/1496fabe28c9f825f6bac0f0d000d9d3276322c3

Vendor Advisories for CVE-2026-17566(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Weakness Classification(2)

MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.

Data Freshness Timeline

(refreshed 11× in last 7d / 11× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-08-01 05:31 UTCEG score recompute
  2. 2026-08-01 05:30 UTCGHSA enrichment
  3. 2026-08-01 04:48 UTCEG score recompute
  4. 2026-08-01 04:48 UTCGHSA enrichment
  5. 2026-08-01 02:15 UTCGHSA enrichment
  6. 2026-07-31 22:17 UTCEG score recompute
  7. 2026-07-31 22:17 UTCGHSA enrichment
  8. 2026-07-31 18:19 UTCEG score recompute
  9. 2026-07-31 17:33 UTCEG score recompute
  10. 2026-07-31 16:21 UTCEG score recompute
  11. 2026-07-31 16:18 UTCMITRE cvelistV5first tracked

Frequently asked(4)

What is CVE-2026-17566?
CVE-2026-17566 is a critical vulnerability published on July 31, 2026. pgAdmin 4's Import/Export Data tool builds a psql \copy (...) command line by interpolating a user-supplied SQL query into a Jinja template and passing the rendered line to psql via --command. To stop an attacker from breaking out of the (...) wrapper, createimportexportjob() (route POST…
When was CVE-2026-17566 disclosed?
CVE-2026-17566 was first published in the National Vulnerability Database on July 31, 2026, with the most recent update on August 1, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-17566?
CVE-2026-17566 has a CVSS v3 base score of 9.9 (NVD).
How do I remediate CVE-2026-17566?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-17566, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

Explore the affected products and dependency analysis for CVE-2026-17566

Explore →

Is Your Infrastructure Affected by CVE-2026-17566?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.