Skip to main content
Mallory
HighVulnerability

CVE-2026-7816: OS command injection in pgAdmin 4 Import/Export query export

Published May 11, 2026 · Updated 2 months ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.7High · v4
EPSS1.4%74th percentile
CISA KEVNoNot listed
In the wildNoneNo exploitation reported
Vendor
Pgadmin
IdentifiersCVE-2026-7816CWE-78 · Improper Neutralization of Special…

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.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an authenticated attacker to achieve arbitrary command execution on the pgAdmin server in the security context of the pgAdmin process. The vulnerability can also be used for arbitrary file write on the server. The resulting impact includes full compromise of confidentiality, integrity, and availability of the pgAdmin host, with potential follow-on actions such as persistence, credential theft, tampering with application state, and lateral movement. Shared server mode deployments are particularly exposed because a lower-privileged authenticated user may be able to escalate from application access to host-level compromise.

Mitigation

If you can’t patch tonight, do this now.

If immediate upgrade is not possible, restrict access to the Import/Export query export feature to only highly trusted administrators, minimize the number of authenticated users with access to pgAdmin, and avoid shared server mode deployments where untrusted or low-privilege users can authenticate. Run pgAdmin with the least privileges possible and isolate the host to reduce the blast radius of server-side command execution or file write. Monitor for abnormal use of query export operations and unexpected child-process execution from the pgAdmin service. These measures reduce exposure but do not fully eliminate the vulnerability.

Remediation

Patch, then assume compromise.

Upgrade pgAdmin 4 to version 9.15 or later. The fixed release introduces parser-based validation for the query embedded in the psql \copy metacommand, rejects null bytes, normalizes line breaks to prevent metacommand termination tricks, enforces strict allow-lists for format, on_error, and log_verbosity, and tightens type and feature-gating checks. If maintaining a downstream fork, incorporate the equivalent hardening changes to all code paths that construct psql metacommands from user input.

Public exploits

Exploits

No public exploits tracked yet. Mallory keeps watching.

View more in app →
No public exploit code observed for this vulnerability. Mallory keeps watching.
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
PgadminPgadmin 4application
FAQ

Frequently asked questions

Is CVE-2026-7816 exploited in the wild?
As of Sep 25, 2026, Mallory has no reports of CVE-2026-7816 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2026-7816?
As of Sep 25, 2026, Mallory has found no public exploit for CVE-2026-7816.
Is there a patch for CVE-2026-7816?
Upgrade pgAdmin 4 to version 9.15 or later. The fixed release introduces parser-based validation for the query embedded in the psql \copy metacommand, rejects null bytes, normalizes line breaks to prevent metacommand termination tricks, enforces strict allow-lists for format, on_error, and log_verbosity, and tightens type and feature-gating checks.
What products are affected by CVE-2026-7816?
Pgadmin 4.
How severe is CVE-2026-7816?
CVE-2026-7816 has a CVSS v4 score of 8.7 (High) and an EPSS score of 1.4% (74th percentile) as of Sep 25, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity5Community discussion across Reddit, Mastodon, and other social sources.