CVE-2026-17566 is an OS command injection vulnerability in pgAdmin 4's Import/Export Data functionality. The affected code interpolates a user-supplied SQL query into a psql \copy command and supplies the rendered command to psql using its command-line execution option. Its custom parenthesis-balance validation incorrectly treats a backslash preceding a single quote as an escape sequence. With PostgreSQL's default standard_conforming_strings setting enabled, psql treats that backslash as an ordinary character, allowing a crafted query to terminate a string literal and the intended \copy subquery wrapper. An attacker can thereby inject a psql TO PROGRAM clause, which psql executes through popen(). The issue affects versions from introduction of the custom parenthesis validator through versions earlier than 9.18.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
This repository is a small standalone Python proof-of-concept for authenticated remote code execution against pgAdmin 4 via CVE-2026-17566. The repo contains three files: an MIT LICENSE, a README describing the vulnerability and usage, and a single executable Python script, pgadmin4_rce_poc.py, which is the clear entry point. The exploit is not part of a larger framework. It uses Python standard-library networking only: urllib for HTTP(S), cookiejar for session handling, ssl for optional certificate verification bypass, regex for CSRF token extraction, and json for request construction. The script implements a complete attack flow: authenticate to pgAdmin, retrieve a CSRF token from GET /login, submit credentials to POST /login, enumerate accessible server objects via GET /browser/servers, then send a crafted JSON request to POST /import_export/job/<sid>. Its core capability is command execution on the host running pgAdmin. The malicious query is built by build_query(), which returns a payload of the form SELECT 'a\') TO PROGRAM '%s' x'. This is designed to exploit a parsing mismatch between pgAdmin's parenthesis checker and psql string handling, causing the injected TO PROGRAM clause to become active. The operator can supply an arbitrary command with --command or request an automatically generated bash reverse shell with --reverse HOST:PORT. Default demonstration behavior writes command output to /tmp/pgadmin_rce_proof, and the export job uses /tmp/pgadmin_export.csv as the nominal output file. Operationally, this is more than a detector: it performs authentication, target enumeration, payload generation, and exploit delivery. However, it is still a PoC-style standalone script rather than a weaponized framework module. The README also notes the code was based on public analysis and may require minor field adjustments depending on exact pgAdmin version behavior.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
10 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
CVE-2026-17566 is referenced in connection with pgAdmin 4 container images/tags 9.16 and 9.17 and the /login endpoint. The content does not describe the vulnerability type, impact, affected-version range, or remediation.
A remote code execution vulnerability in pgAdmin 4's Import/Export Data feature caused by improper validation of a user-supplied SQL query embedded into a psql \copy command. A mismatch between pgAdmin's quote/parenthesis checker and PostgreSQL/psql string handling allows injection of a TO PROGRAM clause that can execute attacker-controlled commands via popen().
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.