CVE-2026-7816: Vulnerability in pgadmin.org pgAdmin 4
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.
AI Analysis
Technical Summary
This vulnerability in pgAdmin 4 affects the Import/Export query export functionality where user-supplied input is directly inserted into a psql \copy metacommand without proper sanitization. An authenticated user can inject payloads such as ") TO PROGRAM 'cmd'" to break out of the intended context and execute arbitrary OS commands on the server, or ") TO '/path'" to write arbitrary files. Additional parameters like format, on_error, and log_verbosity are also vulnerable due to raw interpolation. The flaw is addressed in pgAdmin 4 version 9.15 by implementing a parentheses-balance parser modeled after psql's tokenizer, allow-listing acceptable values for certain fields, rejecting null bytes in queries, and enforcing stricter type and gating validations.
Potential Impact
Successful exploitation allows an authenticated user to execute arbitrary operating system commands or write arbitrary files on the pgAdmin server, leading to full compromise of confidentiality, integrity, and availability of the affected system. This can result in unauthorized data access, data manipulation, or denial of service.
Mitigation Recommendations
A fix is available in pgAdmin 4 version 9.15 which addresses this vulnerability by sanitizing inputs and enforcing strict parsing and validation. Users should upgrade to version 9.15 or later to remediate this issue. Patch status is not explicitly confirmed in the provided data, but the vendor has released a fixed version. No additional mitigations are specified.
CVE-2026-7816: Vulnerability in pgadmin.org pgAdmin 4
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.
CVSS v3.1
Score 8.8high
Affected software
pkg:github/pgadmin-org/pgadmin4Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability in pgAdmin 4 affects the Import/Export query export functionality where user-supplied input is directly inserted into a psql \copy metacommand without proper sanitization. An authenticated user can inject payloads such as ") TO PROGRAM 'cmd'" to break out of the intended context and execute arbitrary OS commands on the server, or ") TO '/path'" to write arbitrary files. Additional parameters like format, on_error, and log_verbosity are also vulnerable due to raw interpolation. The flaw is addressed in pgAdmin 4 version 9.15 by implementing a parentheses-balance parser modeled after psql's tokenizer, allow-listing acceptable values for certain fields, rejecting null bytes in queries, and enforcing stricter type and gating validations.
Potential Impact
Successful exploitation allows an authenticated user to execute arbitrary operating system commands or write arbitrary files on the pgAdmin server, leading to full compromise of confidentiality, integrity, and availability of the affected system. This can result in unauthorized data access, data manipulation, or denial of service.
Mitigation Recommendations
A fix is available in pgAdmin 4 version 9.15 which addresses this vulnerability by sanitizing inputs and enforcing strict parsing and validation. Users should upgrade to version 9.15 or later to remediate this issue. Patch status is not explicitly confirmed in the provided data, but the vendor has released a fixed version. No additional mitigations are specified.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PostgreSQL
- Date Reserved
- 2026-05-04T21:26:58.164Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a01f792cbff5d86102f20fd
Added to database: 05/11/2026, 15:36:50 UTC
Last enriched: 05/26/2026, 20:17:06 UTC
Last updated: 07/31/2026, 19:23:00 UTC
Views: 135
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.