---
cve: "CVE-2026-7816"
severity: "HIGH"
cvss: 8.7
epss: "1.4%"
vendor: "pgadmin.org"
kev: false
exploited: false
published: "2026-05-11 16:17:38"
tags: [cve, security, high]
source: tsecurity.de CVE-Dossier
exported: "2026-09-13T17:47:27+02:00"
---

# CVE-2026-7816

> 8.7 HIGH · 🧪 PoC

## Beschreibung

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.

## CVSS-Vektor

```
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
```

| Metrik | Wert | Bewertung |
|---|---|---|
| AV Angriffsvektor | Netzwerk | bad |
| AC Komplexität | Gering | bad |
| PR Privilegien | Gering | warn |
| UI Interaktion | Keine | bad |

## Schwachstellen-Klasse

- **CWE-78** — Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

## Angriffsmuster (CAPEC)

- [CAPEC-6 — Argument Injection](https://capec.mitre.org/data/definitions/6.html) _(Severity: High)_
- [CAPEC-15 — Command Delimiters](https://capec.mitre.org/data/definitions/15.html) _(Severity: High)_
- [CAPEC-43 — Exploiting Multiple Input Interpretation Layers](https://capec.mitre.org/data/definitions/43.html) _(Severity: High)_
- [CAPEC-88 — OS Command Injection](https://capec.mitre.org/data/definitions/88.html) _(Severity: High)_
- [CAPEC-108 — Command Line Execution through SQL Injection](https://capec.mitre.org/data/definitions/108.html) _(Severity: Very High)_

## Patch verfügbar (OSV)

- 86a8b165abbefd62e78fd43edcd66c0d09649442 (Commit)

## Referenzen

- <https://github.com/pgadmin-org/pgadmin4/issues/9899>

---
_Exportiert aus dem [tsecurity.de CVE-Dossier](https://tsecurity.de/cve?cve=CVE-2026-7816) · Datenquellen: EUVD (ENISA), NVD, OSV, CISA KEV, FIRST EPSS, Exploit-DB, BSI BITS_
