BreachSpiderVerified, not vibes

CVE-2026-7816 in Pgadmin 4

High 8.8

OS command injection (CWE-78) vulnerability in pgAdmin 4 Import/Export query export. User-supplied input was interpolated directly into a psql \copy metacommand template without sanitization. An authenticated user could inject ") TO PROGRAM 'cmd'" to break out of the \copy (...) context and achieve arbitrary comman...

Affects 1 product from 2 vendors. Facts below cite their sources.

CVSS 3.18.8
CVSS v48.7
EPSS2.2%
EPSS percentile83th
FixUnknown

Remotely exploitable over the network, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Pgadmin Pgadmin 4 ≥ 9.4, < 9.15
Program — —

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official description

OS command injection (CWE-78) vulnerability in pgAdmin 4 Import/Export query export. User-supplied input was interpolated directly into a psql \copy metacommand template without sanitization. An authenticated user could inject ") TO PROGRAM 'cmd'" to break out of the \copy (...) context and achieve arbitrary command execution on the pgAdmin server, or ") TO '/path'" for arbitrary file write. Additional fields (format, on_error, log_verbosity) were also raw-interpolated and exploitable. Fix adds a parens-balance parser modeled on psql's strtokx tokenizer, allow-lists format/on_error/log_verbosity, rejects null bytes in the query, and tightens type and gating checks. This issue affects pgAdmin 4: before 9.15.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2026-7816
BreachSpider IDBS-2026-GLOBAL-154908-H
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published2026-05-11
Last modified2026-10-26
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-78: OS Command Injection

Attacker injects OS commands through application inputs passed to system() or equivalent calls, leading to arbitrary command execution.

CWE-89: SQL Injection

Attacker inserts SQL commands into application queries through user-controlled input, allowing unauthorized database access.

Related attack patterns (CAPEC)

CAPEC-7 Blind SQL Injection via CWE-89

CAPEC-43 Exploiting Multiple Input Interpretation Layers via CWE-78

CAPEC-108 Command Line Execution through SQL Injection via CWE-78, CWE-89

CAPEC-109 Object Relational Mapping Injection via CWE-89

CAPEC-110 SQL Injection through SOAP Parameter Tampering via CWE-89

Show all 10

CAPEC-470 Expanding Control over the Operating System from the Database via CWE-89

CAPEC-6 Argument Injection via CWE-78

CAPEC-15 Command Delimiters via CWE-78

CAPEC-66 SQL Injection via CWE-89

CAPEC-88 OS Command Injection via CWE-78

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

A critical OS command injection vulnerability exists in the pgAdmin 4 Import/Export query export feature, allowing authenticated users to execute arbitrary commands on the server or write to arbitrary files.

The vulnerability arises from user-supplied input being directly interpolated into a psql \copy metacommand template without proper sanitization. An attacker can exploit this by injecting malicious input to execute arbitrary commands or write to files.

Questions

What is CVE-2026-7816?

A critical OS command injection vulnerability exists in the pgAdmin 4 Import/Export query export feature, allowing authenticated users to execute arbitrary commands on the server or write to arbitrary files.

What is the CVSS score for CVE-2026-7816?

CVE-2026-7816 has CVSS 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. EPSS: 2.2%.

Is CVE-2026-7816 actively exploited?

No confirmed active exploitation of CVE-2026-7816 as of 2026-11-03.

How do I remediate CVE-2026-7816?

Priority: IMMEDIATE.

What systems are affected by CVE-2026-7816?

CVE-2026-7816 affects Pgadmin Pgadmin 4; Program.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Pgadmin","product":"Pgadmin 4","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-10-26.