CVE-2026-7816 is an authenticated OS command injection vulnerability in pgAdmin 4's Import/Export query export functionality. The flaw is caused by direct interpolation of user-controlled input into a psql \copy metacommand template without adequate sanitization or structural validation. The primary injection point is the exported query text embedded within the \copy (...) context, allowing an attacker to terminate the intended parenthesized query and append attacker-controlled metacommand syntax. Additional parameters, including format, on_error, and log_verbosity, were also raw-interpolated and exploitable. Successful exploitation can cause psql to invoke operating-system commands via metacommand features or redirect output for arbitrary server-side file writes. The issue affects pgAdmin 4 versions before 9.15, including 9.4 through 9.14. The fix in 9.15 adds parenthesis-balance validation modeled on psql tokenization behavior, allow-lists for previously unsanitized option fields, null-byte rejection in the query, newline normalization, and stricter type and gating checks.
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.
No public exploits tracked yet. Mallory keeps watching.
No public exploit code observed for this vulnerability.
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.
8 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
An authenticated remote code execution vulnerability in pgAdmin 4's Import/Export query export feature caused by unsafe interpolation into the psql \copy metacommand, allowing OS command injection and arbitrary file write on the pgAdmin server.
An OS command injection vulnerability in pgAdmin 4 affecting Import/Export query export functionality.
An authenticated OS command injection vulnerability in pgAdmin 4 Import/Export query export caused by unsanitized interpolation into a psql \copy metacommand template, enabling arbitrary command execution on the pgAdmin server or arbitrary file write.
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.